Fix error in log reader
[pyi2ncommon] / src / log_read.py
index 1d8bef4..0288dd8 100644 (file)
@@ -387,10 +387,12 @@ class LogParser(LineReader):
         :rtype: [(str, :py:class:`re.Match` OR str, int)]
         """
         # let super class split data into lines
+        result = []
         for description, raw_line, idx in \
                 super(LogParser, self).prepare_result(*args):
-            result = re.match(self.pattern, raw_line)
-            if result:
-                return description, result, idx
+            matches = re.match(self.pattern, raw_line)
+            if matches:
+                result.append((description, matches, idx))
             else:
-                return description, raw_line, idx
+                result.append((description, raw_line, idx))
+        return result