Skip to content

Commit 3ad53ce

Browse files
author
Gabriel Monroy
committed
fix missing command bug during dispatching
1 parent 131bf8f commit 3ad53ce

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

client/deis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,15 +1692,15 @@ def main():
16921692
return
16931693
docopt(__doc__, argv=['--help'])
16941694
# unless cmd needs to use sys.argv directly
1695-
if cmd not in ('apps_run',):
1696-
# re-parse docopt with the relevant docstring
1697-
docstring = trim(getattr(cli, cmd).__doc__)
1698-
if 'Usage: ' in docstring:
1699-
args.update(docopt(docstring))
17001695
if hasattr(cli, cmd):
17011696
method = getattr(cli, cmd)
17021697
else:
17031698
raise DocoptExit('Found no matching command, try `deis help`')
1699+
# re-parse docopt with the relevant docstring unless it needs sys.argv
1700+
if cmd not in ('apps_run',):
1701+
docstring = trim(getattr(cli, cmd).__doc__)
1702+
if 'Usage: ' in docstring:
1703+
args.update(docopt(docstring))
17041704
# dispatch the CLI command
17051705
try:
17061706
method(args)

0 commit comments

Comments
 (0)