]> piware.de Git - bin.git/blobdiff - workitems.py
workitems: fix crash on empty list
[bin.git] / workitems.py
index 7b3ebef577b2319564588f455c2f4e2108bfd994..68554fe57a19779826f13486cd30be43670655bc 100755 (executable)
@@ -143,7 +143,7 @@ def get_blueprint_status(blueprint_url):
 
     found_status = False
     result = []
-    for l in urllib.urlopen(blueprint_url + '?'):
+    for l in urllib.urlopen(blueprint_url):
         end = False
         if not found_status:
             if status_re.search(l):
@@ -315,6 +315,8 @@ def csv(db, from_date, to_date):
     data = workitems_over_time(db)
 
     dates = sorted(data.keys())
+    if not dates:
+        return
 
     f = _fromstr(from_date or dates[0])
     t = _fromstr(to_date or dates[-1])