extras-buildsys/server PackageJob.py,1.19,1.20
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Sat Aug 6 16:02:04 UTC 2005
Author: dcbw
Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31336/server
Modified Files:
PackageJob.py
Log Message:
Beautify error messages, remove uneeded output from make_srpm failure message
Index: PackageJob.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/PackageJob.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- PackageJob.py 6 Aug 2005 02:35:07 -0000 1.19
+++ PackageJob.py 6 Aug 2005 16:01:38 -0000 1.20
@@ -289,7 +289,7 @@
debugprint("%d: Running %s" % (self.uid, cmd))
s, o = commands.getstatusoutput(cmd)
if s != 0:
- err_msg = "could not check out %s from %s - output was:\n %s" % (self.cvs_tag, self.target, o)
+ err_msg = "Erro: could not check out %s from %s - output was:\n\n%s" % (self.cvs_tag, self.target, o)
else:
# Just in case the 'common' directory didn't come along for the ride,
# get it from CVS
@@ -299,7 +299,7 @@
debugprint("%d: Running %s" % (self.uid, cmd))
s, o = commands.getstatusoutput(cmd)
if s != 0:
- err_msg = "could not check out common directory - output was:\n %s" % (self.cvs_tag, self.target, o)
+ err_msg = "Error: could not check out common directory - output was:\n\n%s" % (self.cvs_tag, self.target, o)
self.bm.notify_checkout_done(self)
@@ -328,7 +328,14 @@
debugprint("%d: Running %s in %s" % (self.uid, cmd, srpm_dir))
s, o = commands.getstatusoutput(cmd)
if s != 0:
- msg = "could not make srpm for %s - output was:\n %s" % (self.cvs_tag, o)
+ # Don't include download progress lines in output
+ lines = o.split('\n')
+ output_lines = []
+ for line in lines:
+ if line.find('..........') == -1 and len(line) > 0:
+ output_lines.append(line)
+ o = string.join(output_lines, '\n')
+ msg = "Error: could not make srpm for %s - output was:\n\n%s" % (self.cvs_tag, o)
raise PrepError(msg)
srpmpath = None
@@ -339,7 +346,7 @@
srpmpath = path.strip()
break
if not srpmpath:
- msg = "could not find srpm for %s - output was:\n %s" % (self.cvs_tag, o)
+ msg = "Error: could not find srpm for %s - output was:\n\n%s" % (self.cvs_tag, o)
raise PrepError(msg)
self.srpm_path = srpmpath
More information about the fedora-extras-commits
mailing list