Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:paultag/python-charlie
Browse files Browse the repository at this point in the history
  • Loading branch information
paultag committed Feb 10, 2012
2 parents 4c16db2 + 2a66abf commit f625217
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions charlie/trains.py
Expand Up @@ -32,11 +32,10 @@ def getTrip(self):
return self.name

def getNextEvent(self, f=None):
if f == None:
f = self.getMostCloseEvent()
if f["InformationType"] != "Predicted":
f = self.getMostCloseEvent()
if f["TargetTime"] < dt.datetime.now(charlie.TIMEZONE):
try:
return self.getNextEvent( self.stopdata[f["next"]] )
return self.stopdata[f["next"]]
except KeyError:
return None
return f
Expand Down

0 comments on commit f625217

Please sign in to comment.