Skip to content

Commit

Permalink
Merge pull request #3 from xamox/master
Browse files Browse the repository at this point in the history
Fixed parsing error
  • Loading branch information
oostendo committed Feb 16, 2012
2 parents 18746a1 + 4925656 commit 4a3186c
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 4a3186c

Please sign in to comment.