summaryrefslogtreecommitdiff
path: root/gbp/scripts/import_orig.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-04-27 22:20:04 +0200
committerGuido Günther <agx@sigxcpu.org>2013-04-27 22:22:28 +0200
commit71e9e244caabfca463e7898ff684a9861bb5a582 (patch)
tree69b01f123e919f9af063dced2c2e56c73a9bd64d /gbp/scripts/import_orig.py
parent59ecaafcfe03bfcda37b1cecfcc98d98383e541c (diff)
GitRepository.commit_dir: raise GitRepositoryError instead of GbpError
and make sure the callers forward the error properly
Diffstat (limited to 'gbp/scripts/import_orig.py')
-rw-r--r--gbp/scripts/import_orig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index d230a96..d082496 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -357,8 +357,9 @@ def main(argv):
info = { 'version': "%s%s-1" % (epoch, version) }
env = { 'GBP_BRANCH': options.debian_branch }
gbpc.Command(options.postimport % info, extra_env=env, shell=True)()
- except (gbpc.CommandExecFailed, GitRepositoryError):
- raise GbpError("Import of %s failed" % source.path)
+ except (gbpc.CommandExecFailed, GitRepositoryError) as err:
+ msg = err.__str__() if len(err.__str__()) else ''
+ raise GbpError("Import of %s failed: %s" % (source.path, msg))
except GbpError as err:
if len(err.__str__()):
gbp.log.err(err)