Don't crash when the PR id is invalid
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
7f2f2d5cdc
commit
8baf2bfc88
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ def main(msg, pipeline_state='complete', seed='empty'):
|
|||
status = 'pending'
|
||||
human_status = 'running'
|
||||
|
||||
pr_id = msg['rev'].partition('PR-')[2]
|
||||
pr_id = str(msg['rev']).partition('PR-')[2]
|
||||
if not pr_id:
|
||||
print(
|
||||
'Invalid revision: %s, could not extract the PR id from it' %
|
||||
|
|
Reference in a new issue