summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-09-10 22:48:58 -0700
committerJesse Keating <jkeating@redhat.com>2010-09-10 22:48:58 -0700
commit67146eef3f613c8d1c3ad7cfde2a69640a2df9bb (patch)
tree3fd347d20aebab27f04af6fd23d519578416077f /src
parente2db22cbcd7fbf2913e1697f20183aeb350a04c2 (diff)
downloadfedora-packager-67146eef3f613c8d1c3ad7cfde2a69640a2df9bb.zip
fedora-packager-67146eef3f613c8d1c3ad7cfde2a69640a2df9bb.tar.gz
fedora-packager-67146eef3f613c8d1c3ad7cfde2a69640a2df9bb.tar.xz
Don't use log.error from within the library
Just raise it, let the caller figure out what to do.
Diffstat (limited to 'src')
-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: