[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053
Mika Pflüger
debian at mikapflueger.de
Fri Dec 23 10:25:04 UTC 2011
The following commit has been merged in the master branch:
commit 44a79b1772fdc09eb206641d4aa31b5a4c84b828
Author: Mika Pflüger <mika at mikapflueger.de>
Date: Thu Jul 28 16:13:28 2011 +0200
piuparts-analyze.py: Repair extract_headers to actually return headers.
diff --git a/piuparts-analyze.py b/piuparts-analyze.py
index 81907cb..3896c64 100644
--- a/piuparts-analyze.py
+++ b/piuparts-analyze.py
@@ -74,21 +74,13 @@ def extract_errors(log):
whole += text
return whole
+
def extract_headers(log):
- f = file(log, "r")
+ f = open(log)
data = f.read()
f.close()
headers = []
- cont = False
- for line in data.split("\n\n", 1)[0].split("\n"):
- if line.startswith("Start:"):
- cont = True
- elif cont and line[:1].isspace():
- pass
- else:
- headers.append(line)
- cont = False
- headers = "\n".join(headers)
+ headers = data.partition("\nExecuting:")[0]
if headers and not headers.endswith("\n"):
headers += "\n"
return headers
--
piuparts git repository
More information about the Piuparts-commits
mailing list