summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2011-01-30 16:13:35 -0700
committerJesse Keating <jkeating@redhat.com>2011-01-30 16:13:35 -0700
commit1a07f1cd355eb2a7d0f398e984771b22b56df6fc (patch)
treeef42fd7a3f893319d6d22462f76fbbf7450d37df
parent442fdd1dddf16ba63b4eff98bcb9583ab8841003 (diff)
downloadfedora-packager-1a07f1cd355eb2a7d0f398e984771b22b56df6fc.zip
fedora-packager-1a07f1cd355eb2a7d0f398e984771b22b56df6fc.tar.gz
fedora-packager-1a07f1cd355eb2a7d0f398e984771b22b56df6fc.tar.xz
Catch the case where there is no branch merge point (#622592)
-rw-r--r--src/pyfedpkg/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index aae3105..9c1adf3 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1023,7 +1023,10 @@ class PackageModule:
localbranch = self.repo.active_branch.name
except TypeError, e:
raise FedpkgError('Repo in inconsistent state: %s' % e)
- merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
+ try:
+ merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
+ except git.errors.GitCommandError, e:
+ raise FedpkgError('Unable to find remote branch. Use --dist')
return(merge.split('/')[2])
def _findmasterbranch(self):