[pypy-commit] pypy stmgc-c7: make thread number optional in logparser

Raemi noreply at buildbot.pypy.org
Tue Aug 26 18:16:04 CEST 2014


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: stmgc-c7
Changeset: r73065:c9e3663343e3
Date: 2014-08-26 18:16 +0200
http://bitbucket.org/pypy/pypy/changeset/c9e3663343e3/

Log:	make thread number optional in logparser

diff --git a/rpython/tool/logparser.py b/rpython/tool/logparser.py
--- a/rpython/tool/logparser.py
+++ b/rpython/tool/logparser.py
@@ -26,8 +26,8 @@
 
 def parse_log(lines, verbose=False):
     color = "(?:\x1b.*?m)?"
-    thread = "\d+#\s"
-    r_start = re.compile(color + thread + 
+    thread = "\d*#?\s?"
+    r_start = re.compile(color + thread +
                          r"\[([0-9a-fA-F]+)\] \{([\w-]+)" + color + "$")
     r_stop  = re.compile(color + thread +
                          r"\[([0-9a-fA-F]+)\] ([\w-]+)\}" + color + "$")
@@ -117,7 +117,7 @@
     for entry in log:
         if not entry[0].startswith(catprefix):
             if len(entry) > 3:
-                newlog.append(entry[:3] + 
+                newlog.append(entry[:3] +
                               (kill_category(entry[3], catprefix),))
             else:
                 newlog.append(entry)


More information about the pypy-commit mailing list