- correctly capture errors from subprocess
This commit is contained in:
parent
1c45ac7daf
commit
876cb98ba7
@ -1,5 +1,6 @@
|
||||
* Tue Mar 13 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- log the rpm2cpio stuff for release notes
|
||||
- correctly capture errors from subprocess
|
||||
|
||||
* Wed Mar 07 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- Call createrepo ourselves for the tree, not buildinstall's job
|
||||
|
@ -69,12 +69,12 @@ class Pungi:
|
||||
|
||||
log.info("Running %s" % ' '.join(command))
|
||||
|
||||
try:
|
||||
(out, err) = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error).communicate()
|
||||
except:
|
||||
p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error)
|
||||
(out, err) = p1.communicate()
|
||||
if p1.returncode != 0:
|
||||
log.error("Got an error from %s" % command[0])
|
||||
log.error(err)
|
||||
raise
|
||||
raise OSError, "Got an error from %s" % command[0]
|
||||
|
||||
log.info(out)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user