aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/buildpackage.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-xgbp/scripts/buildpackage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 8c489bfb..74f2c5bf 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -328,10 +328,11 @@ def check_branch(repo, options):
branch = None
try:
branch = repo.get_branch()
- except GitRepositoryError:
+ except GitRepositoryError as repo_error:
# Not being on any branch is o.k. with --git-ignore-branch
if not options.ignore_branch:
- raise
+ gbp.log.err(repo_error)
+ raise GitRepositoryError("Use --git-ignore-branch to ignore")
ignore = options.ignore_new or options.ignore_branch
if branch != options.debian_branch and not ignore: