summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-09-10 22:48:58 -0700
committerJochen Schmitt <Jochen@herr-schmitt.de>2010-09-15 20:39:55 +0200
commitc5c8654fe2a4af82e28a1127c7c68f80c189615c (patch)
tree3fd347d20aebab27f04af6fd23d519578416077f
parente2db22cbcd7fbf2913e1697f20183aeb350a04c2 (diff)
downloadfedora-packager-c5c8654fe2a4af82e28a1127c7c68f80c189615c.zip
fedora-packager-c5c8654fe2a4af82e28a1127c7c68f80c189615c.tar.gz
fedora-packager-c5c8654fe2a4af82e28a1127c7c68f80c189615c.tar.xz
Don't use log.error from within the library
Just raise it, let the caller figure out what to do. This reverts commit 1118325ec5f7aec7b2d50867848f4b2d51c59b41.
-rw-r--r--src/pyfedpkg/__init__.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 01d6984..5991fce 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -190,8 +190,6 @@ def _run_command(cmd, shell=False, env=None, pipe=[], cwd=None):
except OSError, e:
raise FedpkgError(e)
log.info(output)
- if error:
- log.error(error)
if proc.returncode:
raise FedpkgError('Command %s returned code %s with error: %s' %
(subprocess.list2cmdline(cmd),
@@ -288,8 +286,7 @@ def _srpmdetails(srpm):
raise FedpkgError(e)
name = output
if error:
- log.error(error)
- raise FedpkgError('Error querying srpm')
+ raise FedpkgError('Error querying srpm: %s' % error)
# now get the files and upload files
files = []
@@ -303,8 +300,7 @@ def _srpmdetails(srpm):
except OSError, e:
raise FedpkgError(e)
if error:
- log.error(error)
- raise FedpkgError('Error querying srpm')
+ raise FedpkgError('Error querying srpm:' % error)
contents = output.split()
# Cycle through the stuff and sort correctly by its extension
for file in contents: