we Must parse --dry-run before setting run-mode
This commit is contained in:
parent
5a02026f82
commit
a55964a622
@ -167,10 +167,6 @@ class Configuration:
|
|||||||
if 'sd_notify' in self.args and self.args["sd_notify"]:
|
if 'sd_notify' in self.args and self.args["sd_notify"]:
|
||||||
config['internals'].update({'sd_notify': True})
|
config['internals'].update({'sd_notify': True})
|
||||||
|
|
||||||
self._args_to_config(config, argname='dry_run',
|
|
||||||
logstring='Parameter --dry-run detected, '
|
|
||||||
'overriding dry_run to: {} ...')
|
|
||||||
|
|
||||||
def _process_datadir_options(self, config: Dict[str, Any]) -> None:
|
def _process_datadir_options(self, config: Dict[str, Any]) -> None:
|
||||||
"""
|
"""
|
||||||
Extract information for sys.argv and load directory configurations
|
Extract information for sys.argv and load directory configurations
|
||||||
@ -376,6 +372,10 @@ class Configuration:
|
|||||||
|
|
||||||
def _process_runmode(self, config: Dict[str, Any]) -> None:
|
def _process_runmode(self, config: Dict[str, Any]) -> None:
|
||||||
|
|
||||||
|
self._args_to_config(config, argname='dry_run',
|
||||||
|
logstring='Parameter --dry-run detected, '
|
||||||
|
'overriding dry_run to: {} ...')
|
||||||
|
|
||||||
if not self.runmode:
|
if not self.runmode:
|
||||||
# Handle real mode, infer dry/live from config
|
# Handle real mode, infer dry/live from config
|
||||||
self.runmode = RunMode.DRY_RUN if config.get('dry_run', True) else RunMode.LIVE
|
self.runmode = RunMode.DRY_RUN if config.get('dry_run', True) else RunMode.LIVE
|
||||||
|
Loading…
Reference in New Issue
Block a user