parent
8388c89a29
commit
5e9b089ec2
3 changed files with 17 additions and 1 deletions
2
changelogs/fragments/doc_module_paths_unresolved.yml
Normal file
2
changelogs/fragments/doc_module_paths_unresolved.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- when showing defaults for CLI options in manpage/docs/--help avoid converting paths
|
|
@ -281,8 +281,10 @@ def add_meta_options(parser):
|
||||||
|
|
||||||
def add_module_options(parser):
|
def add_module_options(parser):
|
||||||
"""Add options for commands that load modules"""
|
"""Add options for commands that load modules"""
|
||||||
|
|
||||||
|
module_path = C.config.get_configuration_definition('DEFAULT_MODULE_PATH').get('default', '')
|
||||||
parser.add_option('-M', '--module-path', dest='module_path', default=None,
|
parser.add_option('-M', '--module-path', dest='module_path', default=None,
|
||||||
help="prepend colon-separated path(s) to module library (default=%s)" % C.DEFAULT_MODULE_PATH,
|
help="prepend colon-separated path(s) to module library (default=%s)" % module_path,
|
||||||
action="callback", callback=unfrack_paths, type='str')
|
action="callback", callback=unfrack_paths, type='str')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -330,6 +330,18 @@ class ConfigManager(object):
|
||||||
pvars.append(var_entry['name'])
|
pvars.append(var_entry['name'])
|
||||||
return pvars
|
return pvars
|
||||||
|
|
||||||
|
def get_configuration_definition(self, name, plugin_type=None, plugin_name=None):
|
||||||
|
|
||||||
|
ret = {}
|
||||||
|
if plugin_type is None:
|
||||||
|
ret = self._base_defs.get(name, None)
|
||||||
|
elif plugin_name is None:
|
||||||
|
ret = self._plugins.get(plugin_type, {}).get(name, None)
|
||||||
|
else:
|
||||||
|
ret = self._plugins.get(plugin_type, {}).get(plugin_name, {}).get(name, None)
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
def get_configuration_definitions(self, plugin_type=None, name=None):
|
def get_configuration_definitions(self, plugin_type=None, name=None):
|
||||||
''' just list the possible settings, either base or for specific plugins or plugin '''
|
''' just list the possible settings, either base or for specific plugins or plugin '''
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue