Permalink
Browse files

Mark car park data as unavailable when the status column is 'Faulty' …

…- MOX-137
  • Loading branch information...
1 parent 94cb38d commit fae2b295842eccd9d1476126cd6d507db9553ffc @cnorthwood cnorthwood committed Jan 31, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 demos/molly_oxford/providers/apps/places/__init__.py
@@ -42,12 +42,16 @@ def augment_metadata(self, entities):
if not self._CARPARKS[name] in carparks:
continue
- unavailable = False
- try:
- spaces = int(tr[2].text)
- except ValueError:
+ if tr[5].text == 'Faulty':
spaces = 0
unavailable = True
+ else:
+ try:
+ spaces = int(tr[2].text)
+ unavailable = False
+ except ValueError:
+ spaces = 0
+ unavailable = True
carparks[self._CARPARKS[name]].metadata['park_and_ride'] = {
'spaces': spaces,

0 comments on commit fae2b29

Please sign in to comment.