Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweak code to work again

  • Loading branch information...
commit d34ea82c7b75332f9bc4dcb3b1f07022de21acdb 1 parent e590417
@qwghlm authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 destinationcodes.py
View
8 destinationcodes.py
@@ -50,11 +50,11 @@ def check_tfl_destination_codes():
continue
train = TubeTrain(destination_name, "Northbound", "1200", "C", "001")
destination = train.get_destination_no_via()
- if destination != "Unknown" and not geodata.find_fuzzy_match({}, destination, RailStation):
- print "Destination %s (%s) on %s not found in locations database" % (destination_name, destination_code, line_code)
+ if not destination.endswith("Train") and not geodata.find_fuzzy_match(destination, {}, RailStation):
+ print "Destination %s (%s) on %s not found in locations database" % (destination, destination_code, line_code)
via = train.get_via()
- if via and not geodata.find_fuzzy_match({}, via, RailStation):
- print "Via %s (from %s) on %s not found in locations database" % (via, destination_name, line_code)
+ if via and not geodata.find_fuzzy_match(via, {}, RailStation):
+ print "Via %s (%s) on %s not found in locations database" % (via, destination_code, line_code)
if __name__ == "__main__":
scrape_tfl_destination_codes()
Please sign in to comment.
Something went wrong with that request. Please try again.