From: martin@piware.de <> Date: Wed, 5 Aug 2009 11:48:26 +0000 (+0100) Subject: workitems: fix parsing of last line X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=589632a05389da64aa2f16b844965050f69dc584;p=bin.git workitems: fix parsing of last line --- diff --git a/workitems.py b/workitems.py index 6dc4d6b..f28db44 100755 --- a/workitems.py +++ b/workitems.py @@ -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('
', '').replace('', '').strip() + if '

' in l: + end = True + l = l.replace('
', '').replace('', '').replace('

', '').strip() # ends with empty line - if l.endswith('

') or not l: + if end or not l: break try: