aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-09-09 18:25:55 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-12 08:52:14 +0200
commit969fbb7cc6166439b3c1203c998e00d3d52b6cdf (patch)
treebd5744f436476bffc8dac911b8e20e7a6728c0a0
parent88a0f8c8acadf51e9fcde5c05e89db519908a10d (diff)
command_wrappers: flake8 clean
-rw-r--r--gbp/command_wrappers.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index fb630892..f99b1e85 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -24,6 +24,7 @@ import os
import signal
import gbp.log as log
+
class CommandExecFailed(Exception):
"""Exception raised by the Command class"""
pass
@@ -68,7 +69,7 @@ class Command(object):
self._reset_state()
stdout_arg = subprocess.PIPE if self.capture_stdout else None
stderr_arg = subprocess.PIPE if self.capture_stderr else None
- cmd = [ self.cmd ] + self.args + args
+ cmd = [self.cmd] + self.args + args
if self.shell:
# subprocess.call only cares about the first argument if shell=True
cmd = " ".join(cmd)
@@ -141,10 +142,9 @@ class Command(object):
ret = 1
if ret:
if not quiet:
- self._log_err()
+ self._log_err()
raise CommandExecFailed(self._format_err())
-
def call(self, args, quiet=True):
"""Like L{__call__} but let the caller handle the return status.
@@ -216,7 +216,7 @@ class UnpackTarArchive(Command):
compression = '-a'
Command.__init__(self, 'tar', exclude +
- ['-C', dir, compression, '-xf', archive ])
+ ['-C', dir, compression, '-xf', archive])
self.run_error = 'Couldn\'t unpack "%s": {err_reason}' % self.archive
@@ -249,7 +249,7 @@ class RemoveTree(Command):
"Wrap rm to remove a whole directory tree"
def __init__(self, tree):
self.tree = tree
- Command.__init__(self, 'rm', [ '-rf', tree ])
+ Command.__init__(self, 'rm', ['-rf', tree])
self.run_error = 'Couldn\'t remove "%s": {err_reason}' % self.tree
@@ -282,7 +282,7 @@ class UnpackZipArchive(Command):
self.archive = archive
self.dir = dir
- Command.__init__(self, 'unzip', [ "-q", archive, '-d', dir ])
+ Command.__init__(self, 'unzip', ["-q", archive, '-d', dir])
self.run_error = 'Couldn\'t unpack "%s": {err_reason}' % self.archive
@@ -294,7 +294,7 @@ class CatenateZipArchive(Command):
def __call__(self, target):
self.run_error = 'Couldn\'t append "%s" to "%s": {err_reason}' % \
- (target, self.archive)
+ (target, self.archive)
Command.__call__(self, [target])