projects
/
pywienerlinien
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d163528
)
fixed underground departure parsing
author
Florian Schweikert
<kelvan@logic.at>
Fri, 14 Oct 2011 19:29:22 +0000
(21:29 +0200)
committer
Florian Schweikert
<kelvan@logic.at>
Fri, 14 Oct 2011 19:29:22 +0000
(21:29 +0200)
gotovienna/realtime.py
patch
|
blob
|
history
diff --git
a/gotovienna/realtime.py
b/gotovienna/realtime.py
index
e8ecb47
..
8d2c4d2
100644
(file)
--- a/
gotovienna/realtime.py
+++ b/
gotovienna/realtime.py
@@
-90,10
+90,12
@@
class ITipParser:
if len(th) < 2:
#TODO replace with logger
print "[DEBUG] Unable to find th in:\n%s" % str(tr)
- continue
-
+ elif len(th) == 2:
+ t = th[-1]
+ else:
+ t = th[-2]
# parse time
- time = th[-2].text.split(' ')
+ time = t.text.split(' ')
if len(time) < 2:
#print 'Invalid time: %s' % time
# TODO: Issue a warning OR convert "HH:MM" format to countdown