diff --git a/roles/git/hooks/files/post-receive-fedora-messaging b/roles/git/hooks/files/post-receive-fedora-messaging index 0147f7cebb..7332e527fb 100644 --- a/roles/git/hooks/files/post-receive-fedora-messaging +++ b/roles/git/hooks/files/post-receive-fedora-messaging @@ -120,7 +120,10 @@ for line in lines: revs = [head.id] def _build_commit(rev): - commit = repo.revparse_single(rev.hex) + if instance(rev, str): + commit = repo.revparse_single(rev) + else: + commit = repo.revparse_single(rev.hex) # Tags are a little funny, and vary between versions of pygit2, so we'll # just ignore them as far as fedmsg is concerned.