diff options
author | Guido Günther <agx@sigxcpu.org> | 2015-03-26 13:06:45 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2015-03-27 12:16:31 +0100 |
commit | 335dfdb7a95a92d773749e6f2b5ebf951a792608 (patch) | |
tree | 2c28c9cdae03a640d137e206a3fd1006e89d4c04 /gbp/pkg/pristinetar.py | |
parent | b1b7761120b2321449109e47b89bea85b8c90e35 (diff) |
command_wrapper: Make error reporting more flexible
We allow to substitute stderr, stdout and error_reason in run_error now.
These changes the API for derived classses slightly so fix them up as
well.
Diffstat (limited to 'gbp/pkg/pristinetar.py')
-rw-r--r-- | gbp/pkg/pristinetar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/pkg/pristinetar.py b/gbp/pkg/pristinetar.py index 03f043d..1c4eb5b 100644 --- a/gbp/pkg/pristinetar.py +++ b/gbp/pkg/pristinetar.py @@ -63,7 +63,7 @@ class PristineTar(Command): @param archive: the name of the orig archive @type archive: C{str} """ - self.run_error = 'Couldn\'t checkout "%s"' % os.path.basename(archive) + self.run_error = 'Couldn\'t checkout "%s": {err_reason}' % os.path.basename(archive) self.__call__(['checkout', archive]) def commit(self, archive, upstream): @@ -76,7 +76,7 @@ class PristineTar(Command): @param upstream: the upstream branch to diff against @type upstream: C{str} """ - self.run_error = ("Couldn't commit to '%s' with upstream '%s'" % + self.run_error = ("Couldn't commit to '%s' with upstream '%s': {err_reason}" % (self.branch, upstream)) self.__call__(['commit', archive, upstream]) |