]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/analyse-cxx-log.py
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / buildscripts / analyse-cxx-log.py
index e0872f011e2a8f959d9704847bc6035ad86886c7..48748a032fb9aad84cd75a2ef628349b80a00aea 100644 (file)
@@ -5,8 +5,8 @@ import re
 import string
 
 if len (sys.argv) < 5:
-       print 'args: LOGFILE CLASS FUNC NEW_FUNC'
-       
+    print 'args: LOGFILE CLASS FUNC NEW_FUNC'
+    
 func = sys.argv[3]
 new_func = sys.argv[4]
 klazz = sys.argv[2]
@@ -16,27 +16,27 @@ regex = re.compile ("([^:]+):([0-9]+): error: .class ([_a-zA-Z]+). has no member
 files = {}
 
 for l in log_ls:
-       m =  regex.search (l)
-       if not m:
-               continue
-       print l
+    m =  regex.search (l)
+    if not m:
+        continue
+    print l
 
-       file = m.group (1)
-       line_no = string.atoi (m.group (2))
-       klass = m.group (3)
-       
-       if klass <> klazz:
-               continue
+    file = m.group (1)
+    line_no = string.atoi (m.group (2))
+    klass = m.group (3)
+    
+    if klass <> klazz:
+        continue
 
-       if not files.has_key (file):
-               files[file] = open (file).read ().split ('\n')
+    if not files.has_key (file):
+        files[file] = open (file).read ().split ('\n')
 
-       line_no -= 1 
-       files[file][line_no] = re.sub (func, new_func, files[file][line_no])
+    line_no -= 1 
+    files[file][line_no] = re.sub (func, new_func, files[file][line_no])
 
 
 for (f,ls) in files.items():
-       print 'writing ', f 
-       os.rename (f, f + '~')
-       open (f, 'w').write ('\n'.join (ls))
+    print 'writing ', f 
+    os.rename (f, f + '~')
+    open (f, 'w').write ('\n'.join (ls))