Skip to content

Commit

Permalink
[scripts][cylc] Fix no argument handling for message command
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaist committed Dec 1, 2019
1 parent 121338c commit 7a52b8e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cylc/flow/scripts/cylc.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ def main(cmd_args, version, help_):
cmd_args.insert(cmd_args.index(arg) + 1, "--")
break
elif cylc_cmd.endswith("message"):
if cmd_args[0] in ['-s', '--severity', '-p', '--priority']:
dd_index = 2
else:
dd_index = 0
cmd_args.insert(dd_index, "--")
if cmd_args:
if cmd_args[0] in ['-s', '--severity', '-p', '--priority']:
dd_index = 2
else:
dd_index = 0
cmd_args.insert(dd_index, "--")

if help_:
execute_cmd(cylc_cmd, "--help")
Expand Down

0 comments on commit 7a52b8e

Please sign in to comment.