Skip to content

Commit

Permalink
Fixed a small bug in data parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Oliver committed Feb 16, 2012
1 parent ac7a770 commit 4925656
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zxing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def __init__(self, zxing_output):
parsed_block = True
continue

if (parsed_block and not re.match("Also, there were", l)):
if (parsed_block and not re.match("Found\s\d\sresult\spoints", l)):
self.data += l + "\n"
continue

if (parsed_block and re.match("Also, there were", l)):
if (parsed_block and re.match("Found\s\d\sresult\spoints", l)):
parsed_block = False
point_block = True
continue
Expand All @@ -106,7 +106,8 @@ def __init__(self, zxing_output):
m = re.search("Point\s(\d+):\s\(([\d\.]+),([\d\.]+)\)", l)
if (m):
self.points.append((float(m.group(2)), float(m.group(3))))


self.points = self.points[0:4]
return


Expand Down

0 comments on commit 4925656

Please sign in to comment.