mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
Moving check for conflicting args to cli.py
This commit is contained in:
parent
a1cb24b3ef
commit
911b4565be
2 changed files with 10 additions and 10 deletions
|
|
@ -343,6 +343,16 @@ class HelpfulArgumentParser(object):
|
|||
if parsed_args.csr:
|
||||
self.handle_csr(parsed_args)
|
||||
|
||||
# Avoid conflicting args
|
||||
conficting_args = ["quiet", "noninteractive_mode", "text_mode"]
|
||||
if parsed_args.dialog_mode:
|
||||
for arg in conficting_args:
|
||||
if getattr(parsed_args, arg):
|
||||
raise errors.Error(
|
||||
("Conflicting values for displayer."
|
||||
" {0} conflicts with dialog_mode").format(arg)
|
||||
)
|
||||
|
||||
hooks.validate_hooks(parsed_args)
|
||||
|
||||
return parsed_args
|
||||
|
|
|
|||
|
|
@ -673,16 +673,6 @@ def main(cli_args=sys.argv[1:]):
|
|||
|
||||
sys.excepthook = functools.partial(_handle_exception, config=config)
|
||||
|
||||
# Avoid conflicting args
|
||||
conficting_args = ["quiet", "noninteractive_mode", "text_mode"]
|
||||
if config.dialog_mode:
|
||||
for arg in conficting_args:
|
||||
if getattr(config, arg):
|
||||
raise errors.Error(
|
||||
("Conflicting values for displayer."
|
||||
" {0} conflicts with dialog_mode").format(arg)
|
||||
)
|
||||
|
||||
# Displayer
|
||||
if config.quiet:
|
||||
config.noninteractive_mode = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue