check that all arguments are optional when no config
This commit is contained in:
parent
23cacf2fa5
commit
8bd3649f18
@ -60,7 +60,8 @@ def execute(raw_args=sys.argv):
|
|||||||
# an update happened, reload conf.
|
# an update happened, reload conf.
|
||||||
conf = config.load_conf(path=conf_path)
|
conf = config.load_conf(path=conf_path)
|
||||||
except config.ConfigurationNotFound:
|
except config.ConfigurationNotFound:
|
||||||
if len(remaining_args) == 0 or remaining_args[0] == 'init' or remaining_args[0][0] == '-':
|
if (len(remaining_args) == 0 or remaining_args[0] == 'init'
|
||||||
|
or all(arg[0] == '-' for arg in remaining_args)): # only optional arguments
|
||||||
conf = config.load_default_conf()
|
conf = config.load_default_conf()
|
||||||
conf.filename = conf_path
|
conf.filename = conf_path
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user