[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51

David Steele dsteele at gmail.com
Wed May 15 10:09:57 UTC 2013


The following commit has been merged in the master branch:
commit 0c669f87fa8f4bce6596bad043b8ab297ab484a8
Author: David Steele <dsteele at gmail.com>
Date:   Tue May 7 23:34:26 2013 -0400

    detect_well_known_errors - Fix problem re parsing for python 2.6.
    
    The script is crashing on piatti.

diff --git a/master-bin/detect_well_known_errors b/master-bin/detect_well_known_errors
index 5697a77..80f224e 100755
--- a/master-bin/detect_well_known_errors
+++ b/master-bin/detect_well_known_errors
@@ -142,11 +142,13 @@ class Problem():
         probbody = pb.read()
         pb.close()
 
-        tagged = re.sub( "^([A-Z]+=)", "<hdr>\g<0>", probbody, 0, re.MULTILINE)
+        re_obj = re.compile( "^([A-Z]+=)", re.MULTILINE )
+        tagged = re.sub( re_obj, "<hdr>\g<0>", probbody, 0 )
 
         for chub in re.split( '<hdr>', tagged )[1:]:
 
-            (name,value) = re.split( "=", chub, 1, re.MULTILINE )
+            re_obj = re.compile( "=", re.MULTILINE )
+            (name,value) = re.split( re_obj, chub, 1 )
 
             while value[-1] == '\n':
                 value = value[:-1]

-- 
piuparts git repository



More information about the Piuparts-commits mailing list