summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-01-04 14:30:34 -0800
committerJesse Keating <jkeating@redhat.com>2010-01-04 14:30:34 -0800
commite71b6bebab3df14e75f12990f7914bc8b36f5347 (patch)
tree7ec3478a72f5d791d1c547424c833b5265753d34 /src
parentfe2f05f3d8f0a14ec70cc6ad768f8f24225b290a (diff)
downloadfedora-packager-e71b6bebab3df14e75f12990f7914bc8b36f5347.tar.gz
fedora-packager-e71b6bebab3df14e75f12990f7914bc8b36f5347.tar.xz
fedora-packager-e71b6bebab3df14e75f12990f7914bc8b36f5347.zip
Catch subprocess errors and re-raise our error
Diffstat (limited to 'src')
-rw-r--r--src/fedpkg/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fedpkg/__init__.py b/src/fedpkg/__init__.py
index 17ea192..0e668b9 100644
--- a/src/fedpkg/__init__.py
+++ b/src/fedpkg/__init__.py
@@ -194,7 +194,10 @@ class PackageModule:
raise FedpkgError("Need to build srpm and rpm first")
cmd = ['rpmlint', os.path.join(self.path, srpm),
os.path.join(self.path, rpm)]
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()
+ try:
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()
+ except subprocess.CalledProcessError, e:
+ raise FedpkgError(e)
return output[0]