protonmsg: don't send rpm.sign messages when the sigkey is empty

When a build completes, we store the original, unsigned rpm headers
to disk. This results in the postRPMSign callback being called, and
a rpm.sign message being sent with an empty sigkey. The intended
sematics of the rpm.sign message is to notify a service when an rpm
has been signed. Therefore, we should not be sending a message when
the sigkey is empty.
This commit is contained in:
Mike Bonnet 2017-10-19 13:41:47 -04:00 committed by Mike McLean
parent 282a0479a7
commit c6a1e0952a
2 changed files with 14 additions and 0 deletions

View file

@ -196,6 +196,8 @@ def prep_import(cbtype, *args, **kws):
@convert_datetime
@callback('postRPMSign')
def prep_rpm_sign(cbtype, *args, **kws):
if not kws['sigkey']:
return
address = 'sign.rpm'
props = {'type': cbtype[4:],
'sigkey': kws['sigkey'],