]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
Process log from end and stop at first 'Processing files' occurence. Fixes case when...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 5 Dec 2015 09:36:03 +0000 (10:36 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 5 Dec 2015 09:36:03 +0000 (10:36 +0100)
PLD_Builder/util.py

index 905187898d0608d64d20984e6ba0919589219a64..b623115d7f2e407e3fe30d69e66a97bfe4a7b32f 100644 (file)
@@ -52,8 +52,11 @@ def clean_tmp(dir):
 def collect_files(log, basedir = "/home"):
     f = open(log, 'r')
     rx = re.compile(r"^Wrote: (%s.*\.rpm)$" % basedir)
+    proc = re.compile(r"^Processing (files):.*$")
     files = []
-    for l in f.xreadlines():
+    for l in reversed(list(f.xreadlines())):
+        if proc.match(l):
+            break
         m = rx.search(l)
         if m:
             files.append(m.group(1))
This page took 0.142714 seconds and 4 git commands to generate.