summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-11-14 15:23:48 +0200
committerGuido Günther <agx@sigxcpu.org>2012-11-23 17:28:26 +0100
commitfe1e12057a4779eaf14cbce24809498631cb55cd (patch)
tree95efd9bb232c3da230189cd3621fd49b9296c004 /gbp
parent4c9bb9f5780cdf6d97ba83dfd8fc0f13a1d6aadf (diff)
downloadgit-buildpackage-fe1e12057a4779eaf14cbce24809498631cb55cd.tar.gz
git-buildpackage-fe1e12057a4779eaf14cbce24809498631cb55cd.tar.bz2
git-buildpackage-fe1e12057a4779eaf14cbce24809498631cb55cd.zip
command_wrappers: suppress some pylint warnings
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rw-r--r--gbp/command_wrappers.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index 4d3015d2..cc6cebc3 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -23,8 +23,7 @@ import subprocess
import os
import os.path
import signal
-import log
-from errors import GbpError
+import gbp.log as log
class CommandExecFailed(Exception):
"""Exception raised by the Command class"""
@@ -40,7 +39,8 @@ class Command(object):
def __init__(self, cmd, args=[], shell=False, extra_env=None, cwd=None):
self.cmd = cmd
self.args = args
- self.run_error = "Couldn't run '%s'" % (" ".join([self.cmd] + self.args))
+ self.run_error = "Couldn't run '%s'" % (" ".join([self.cmd] +
+ self.args))
self.shell = shell
self.retcode = 1
self.cwd = cwd
@@ -81,8 +81,8 @@ class Command(object):
-retcode)
elif retcode > 0:
err_detail = "%s returned %d" % (self.cmd, retcode)
- except OSError as e:
- err_detail = "Execution failed: " + e.__str__()
+ except OSError as err:
+ err_detail = "Execution failed: %s" % err
retcode = 1
if retcode:
log.err("%s: %s" % (self.run_error, err_detail))
@@ -118,8 +118,8 @@ class Command(object):
"""
try:
ret = self.__call(args)
- except OSError as e:
- raise CommandExecFailed("Execution failed: %s" % e)
+ except OSError as err:
+ raise CommandExecFailed("Execution failed: %s" % err)
return ret
@@ -141,7 +141,7 @@ class UnpackTarArchive(Command):
def __init__(self, archive, dir, filters=[], compression=None):
self.archive = archive
self.dir = dir
- exclude = [("--exclude=%s" % filter) for filter in filters]
+ exclude = [("--exclude=%s" % _filter) for _filter in filters]
if not compression:
compression = '-a'
@@ -156,7 +156,7 @@ class PackTarArchive(Command):
def __init__(self, archive, dir, dest, filters=[], compression=None):
self.archive = archive
self.dir = dir
- exclude = [("--exclude=%s" % filter) for filter in filters]
+ exclude = [("--exclude=%s" % _filter) for _filter in filters]
if not compression:
compression = '-a'