From: wanchao-xu Date: Mon, 29 Apr 2024 06:17:04 +0000 (+0800) Subject: rpm_ch: check the branch of repo whether exist. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4df8fb8087adb7587292d6ea10a4dc4873ed8a3d;p=tools%2Fgit-buildpackage.git rpm_ch: check the branch of repo whether exist. Change-Id: I13feeaed486f4aab5189b0e2619c83fbf465f27c Signed-off-by: wanchao-xu --- diff --git a/gbp/scripts/rpm_ch.py b/gbp/scripts/rpm_ch.py index bb02e91e..b5830dad 100644 --- a/gbp/scripts/rpm_ch.py +++ b/gbp/scripts/rpm_ch.py @@ -124,10 +124,8 @@ def determine_editor(options): def check_branch(repo, options): """Check the current git branch""" - try: - branch = repo.get_branch() - except GitRepositoryError: - branch = None + # Check branch + branch = repo.get_branch() if options.packaging_branch != branch and not options.ignore_branch: gbp.log.err("You are not on branch '%s' but on '%s'" % (options.packaging_branch, branch))