diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-06-29 13:16:38 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-06-29 13:17:34 +0200 |
commit | a2ce3872d163d84290d1f8b119d4262e8ccdfdc8 (patch) | |
tree | 1fe13139d64bf65c1b7bb52281e0bb32ebc5f616 | |
parent | 9af186879956d16f4916e8fa8c29f18706958d04 (diff) |
gbp.git.GitRepository.has_branch(): use _git_command
instead of the deprecated _git_getoutput
-rw-r--r-- | gbp/git/repository.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 9a0256b..11aff4f 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -337,8 +337,9 @@ class GitRepository(object): ref = 'refs/remotes/%s' % branch else: ref = 'refs/heads/%s' % branch - failed = self._git_getoutput('show-ref', [ ref ])[1] - if failed: + try: + self._git_command('show-ref', [ ref ]) + except GitRepositoryError: return False return True |