From 67146eef3f613c8d1c3ad7cfde2a69640a2df9bb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 10 Sep 2010 22:48:58 -0700 Subject: Don't use log.error from within the library Just raise it, let the caller figure out what to do. --- src/pyfedpkg/__init__.py | 8 ++------ 1 file 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: -- cgit