aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-06-26 12:23:30 +0200
committerGuido Günther <agx@sigxcpu.org>2017-06-26 12:23:30 +0200
commitbcdedd64892965a4582715d0589e235237220fda (patch)
tree5ea41beb0eca2636ffb96cf59041cfb300f5989d
parent956982c52500ff52bdab6bb811b86ad6fedbaa19 (diff)
pristine-tar: allow to silence command errors
So far we used the defaults of command_wrapper which prints to stderr. Add a quiet option to suppress this.
-rw-r--r--gbp/pkg/pristinetar.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gbp/pkg/pristinetar.py b/gbp/pkg/pristinetar.py
index bb84a2f..4b7a87e 100644
--- a/gbp/pkg/pristinetar.py
+++ b/gbp/pkg/pristinetar.py
@@ -57,7 +57,7 @@ class PristineTar(Command):
return commit
return None
- def checkout(self, archive):
+ def checkout(self, archive, quiet=False):
"""
Checkout an orig archive from pristine-tar branch
@@ -65,9 +65,9 @@ class PristineTar(Command):
@type archive: C{str}
"""
self.run_error = 'Pristine-tar couldn\'t checkout "%s": {stderr_or_reason}' % os.path.basename(archive)
- self.__call__(['checkout', archive])
+ self.__call__(['checkout', archive], quiet=quiet)
- def commit(self, archive, upstream):
+ def commit(self, archive, upstream, quiet=False):
"""
Commit an archive I{archive} to the pristine tar branch using upstream
branch ${upstream}.
@@ -79,10 +79,10 @@ class PristineTar(Command):
"""
self.run_error = ("Couldn't commit to '%s' with upstream '%s': {stderr_or_reason}" %
(self.branch, upstream))
- self.__call__(['commit', archive, upstream])
+ self.__call__(['commit', archive, upstream], quiet=quiet)
- def verify(self, archive):
+ def verify(self, archive, quiet=False):
"""Verify an archive's I{archive} checksum using to the pristine tar branch"""
self.run_error = 'Pristine-tar couldn\'t verify "%s": {stderr_or_reason}' % os.path.basename(archive)
- self.__call__(['verify', archive])
+ self.__call__(['verify', archive], quiet=quiet)