diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-07-03 11:48:21 +0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-07-28 16:27:40 +0200 |
commit | cd829c9437d42f3223fbf51e22b795d2fcc33d00 (patch) | |
tree | 34c6deac49a9c06b8c01fb10c5fbcc21ce31c7e2 /gbp/scripts/clone.py | |
parent | 6e4138faae673bd3398b1c85829a41e348e40caf (diff) |
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 'gbp/scripts/clone.py')
-rwxr-xr-x | gbp/scripts/clone.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py index f8933448..65dbc20b 100755 --- a/gbp/scripts/clone.py +++ b/gbp/scripts/clone.py @@ -24,7 +24,6 @@ import os, os.path from gbp.config import (GbpOptionParser, GbpOptionGroup) from gbp.deb.git import DebianGitRepository from gbp.git import (GitRepository, GitRepositoryError) -from gbp.command_wrappers import (Command, CommandExecFailed) from gbp.errors import GbpError import gbp.log @@ -100,8 +99,9 @@ def main(argv): repo.set_branch(options.debian_branch) - except CommandExecFailed: - retval = 1 + except GitRepositoryError as err: + gbp.log.err("Git command failed: %s" % err) + ret = 1 except GbpError as err: if len(err.__str__()): gbp.log.err(err) |