summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-07-03 11:48:21 +0300
committerGuido Günther <agx@sigxcpu.org>2012-07-28 16:27:40 +0200
commitcd829c9437d42f3223fbf51e22b795d2fcc33d00 (patch)
tree34c6deac49a9c06b8c01fb10c5fbcc21ce31c7e2 /examples
parent6e4138faae673bd3398b1c85829a41e348e40caf (diff)
downloadgit-buildpackage-cd829c9437d42f3223fbf51e22b795d2fcc33d00.tar.gz
git-buildpackage-cd829c9437d42f3223fbf51e22b795d2fcc33d00.tar.bz2
git-buildpackage-cd829c9437d42f3223fbf51e22b795d2fcc33d00.zip
GitRepository: raise GitRepositoryError on git errors
Raise GitRepositoryError in cases where CommandExecFailed (from GitCommand) was previously silently passed forward. Heavily based on a patch by Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/gbp-add-patch6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/gbp-add-patch b/examples/gbp-add-patch
index e88af6eb..8ecb1d1e 100755
--- a/examples/gbp-add-patch
+++ b/examples/gbp-add-patch
@@ -35,9 +35,7 @@ commits debian/patches/0010-bla-fasel with this changelog message:
import re
import sys
import os, os.path
-from gbp.command_wrappers import (Command,
- CommandExecFailed,
- GitCommand)
+from gbp.command_wrappers import (Command)
from gbp.config import (GbpOptionParserDebian, GbpOptionGroup)
from gbp.errors import GbpError
from gbp.git import (GitRepositoryError, GitRepository)
@@ -104,7 +102,7 @@ def main(argv):
repo.commit_staged(edit=options.edit, msg=msg)
# FIXME: handle the series file
- except CommandExecFailed:
+ except GitRepositoryError:
retval = 1
except GbpError as err:
if len(err.__str__()):