ostree: Fix handler crash without commit ID

If there is no new commit in the repo, we should not wait for a
signature, as there is nothing to sign.

Fixes: https://pagure.io/pungi/issue/1046
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-09-13 12:32:28 +02:00
parent be81aeaa7d
commit 93bc843682

View File

@ -55,6 +55,10 @@ if __name__ == '__main__':
repo = data['local_repo_path']
commit = data['commitid']
if not commit:
print("No new commit was created, nothing will get signed.")
sys.exit(0)
path = '%s/objects/%s/%s.commitmeta' % (repo, commit[:2], commit[2:])
config = fedmsg.config.load_config()