[FIX] iTip crashes if no station given
authorFlorian Schweikert <kelvan@logic.at>
Mon, 26 Sep 2011 12:12:22 +0000 (14:12 +0200)
committerFlorian Schweikert <kelvan@logic.at>
Mon, 26 Sep 2011 12:12:22 +0000 (14:12 +0200)
iTip.py

diff --git a/iTip.py b/iTip.py
index 3e327c1..a0941ea 100644 (file)
--- a/iTip.py
+++ b/iTip.py
@@ -115,7 +115,10 @@ if __name__ == '__main__':
         l = args.l.upper()
     else:
         l = None
-    s = args.s.decode('UTF-8')
+    if args.s:
+        s = args.s.decode('UTF-8')
+    else:
+        s = ''
     
     if l and l in lines:
         stations = itip.get_stations(l)