diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-04-25 23:34:59 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-04-26 07:15:19 +0200 |
commit | 1375fd4705b40a0f0d1f68b42ebcb2bbe02b31fe (patch) | |
tree | 042dd8502414fea987484ffc1a8190a7006ef629 /gbp/scripts/clone.py | |
parent | a4667c717d236ab9b4572dedd92d532eb14c5645 (diff) |
clone: don't print exception when we can't find the source package
Diffstat (limited to 'gbp/scripts/clone.py')
-rwxr-xr-x | gbp/scripts/clone.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py index a06307d5..04836f71 100755 --- a/gbp/scripts/clone.py +++ b/gbp/scripts/clone.py @@ -42,7 +42,7 @@ def apt_showsrc(pkg): aptsrc(quiet=True) return aptsrc.stdout except CommandExecFailed: - gbp.log.err("Can't find source package for '%s'" % pkg) + return '' def vcs_git_url(pkg): @@ -70,7 +70,8 @@ def vcs_git_url(pkg): version = repo = None if not repos: - raise GbpError("Can't find a source package for '%s'" % pkg) + gbp.log.err("Can't find a source package for '%s'" % pkg) + return None s = sorted(repos, key=cmp_to_key(DpkgCompareVersions())) return repos[s[-1]] @@ -158,6 +159,8 @@ def main(argv): return 1 else: source = repo_to_url(args[1]) + if not source: + return 1 clone_to, auto_name = (os.path.curdir, True) if len(args) < 3 else (args[2], False) try: |