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