Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Commit

Permalink
Fixes mode argument with --mode=genanswers
Browse files Browse the repository at this point in the history
When `sudo atomic run projectatomic/helloapache --mode=genanswers` is
supplied, the resulting error shows that `--mode=genanswers` is an
unrecognized argument.

This was introduced after refactoring the cli/main.py code to NOT include
uneeded parameters such as --provider-auth to CLI options such as init
and genanswers.

By adding `self.parser.parse_known_args`, this will ignore the added
--mode=genaswers to the CLI.

Fixes #792
  • Loading branch information
cdrage committed Aug 30, 2016
1 parent 0ebf267 commit 39c3565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atomicapp/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def run(self):
cmdline.insert(0, args.action) # Place 'action' at front

# Finally, parse args and give error if necessary
args = self.parser.parse_args(cmdline)
args, unknown = self.parser.parse_known_args(cmdline)

# Setup logging (now with arguments from cmdline) and log a few msgs
Logging.setup_logging(args.verbose, args.quiet, args.logtype)
Expand Down

0 comments on commit 39c3565

Please sign in to comment.