]> piware.de Git - bin.git/commitdiff
workitems: fix parsing of last line
authormartin@piware.de <>
Wed, 5 Aug 2009 11:48:26 +0000 (12:48 +0100)
committermartin@piware.de <>
Wed, 5 Aug 2009 11:48:26 +0000 (12:48 +0100)
workitems.py

index 6dc4d6b58e4da51f2276dc973e3698863f091ec0..f28db44153602ee3079ab5464d6bdd089904ee35 100755 (executable)
@@ -91,15 +91,18 @@ def get_blueprint_workitems(blueprint_url):
     found_workitems = False
     result = []
     for l in urllib.urlopen(blueprint_url):
+        end = False
         if not found_workitems:
             if work_items_re.search(l):
                 found_workitems = True
             continue
 
-        l = l.replace('<br />', '').replace('</div>', '').strip()
+        if '</p>' in l:
+            end = True
+        l = l.replace('<br />', '').replace('</div>', '').replace('</p>', '').strip()
 
         # ends with empty line
-        if l.endswith('</p>') or not l:
+        if end or not l:
             break
 
         try: