Improve docstring, remove unneeded method

This commit is contained in:
Matthias 2019-07-21 16:19:31 +02:00
parent 2c7a248307
commit 432b106d58

View File

@ -124,7 +124,9 @@ class Configuration(object):
setup_logging(config)
def _process_strategy_options(self, config: Dict[str, Any]) -> None:
def _process_common_options(self, config: Dict[str, Any]) -> None:
self._process_logging_options(config)
# Set strategy if not specified in config and or if it's non default
if self.args.strategy != constants.DEFAULT_STRATEGY or not config.get('strategy'):
@ -133,11 +135,6 @@ class Configuration(object):
self._args_to_config(config, argname='strategy_path',
logstring='Using additional Strategy lookup path: {}')
def _process_common_options(self, config: Dict[str, Any]) -> None:
self._process_logging_options(config)
self._process_strategy_options(config)
if ('db_url' in self.args and self.args.db_url and
self.args.db_url != constants.DEFAULT_DB_PROD_URL):
config.update({'db_url': self.args.db_url})
@ -171,8 +168,8 @@ class Configuration(object):
def _process_datadir_options(self, config: Dict[str, Any]) -> None:
"""
Extract information for sys.argv and load datadir configuration:
the --datadir option
Extract information for sys.argv and load directory configurations
--user-data, --datadir
"""
if 'user_data_dir' in self.args and self.args.user_data_dir:
config.update({'user_data_dir': self.args.user_data_dir})
@ -181,7 +178,6 @@ class Configuration(object):
config.update({'user_data_dir': str(Path.cwd() / "user_data")})
# reset to user_data_dir so this contains the absolute path.
config['user_data_dir'] = create_userdata_dir(config['user_data_dir'])
logger.info('Using user-data directory: %s ...', config['user_data_dir'])
if 'datadir' in self.args and self.args.datadir: