From 4925656e3216ff71afa3393244998e44f22ad95c Mon Sep 17 00:00:00 2001 From: Anthony Oliver Date: Thu, 16 Feb 2012 15:25:24 -0500 Subject: [PATCH] Fixed a small bug in data parsing --- zxing/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zxing/__init__.py b/zxing/__init__.py index 87a29b9..4ea5961 100644 --- a/zxing/__init__.py +++ b/zxing/__init__.py @@ -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 @@ -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