Declare the variable before using it and small style fix
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
78e11431db
commit
7f2f2d5cdc
1 changed files with 2 additions and 3 deletions
|
@ -44,6 +44,7 @@ def main(msg, pipeline_state='complete', seed='empty'):
|
||||||
print("Pipeline state is not 'complete' or 'running'.")
|
print("Pipeline state is not 'complete' or 'running'.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
commit_hash_text = ''
|
||||||
# test complete messages
|
# test complete messages
|
||||||
if pipeline_state == 'complete':
|
if pipeline_state == 'complete':
|
||||||
done_states = {
|
done_states = {
|
||||||
|
@ -60,8 +61,6 @@ def main(msg, pipeline_state='complete', seed='empty'):
|
||||||
human_status = done_states[state]['human']
|
human_status = done_states[state]['human']
|
||||||
if 'commit_hash' in msg:
|
if 'commit_hash' in msg:
|
||||||
commit_hash_text = ' for %s' % msg['commit_hash'][:8]
|
commit_hash_text = ' for %s' % msg['commit_hash'][:8]
|
||||||
else:
|
|
||||||
commit_hash_text = ''
|
|
||||||
|
|
||||||
# test running messages
|
# test running messages
|
||||||
elif pipeline_state == 'running':
|
elif pipeline_state == 'running':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue