diff options
author | David Moreau-Simard <dms@redhat.com> | 2017-10-02 12:08:54 -0400 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2017-10-03 09:19:04 -0400 |
commit | 9b693235f0655293fd3fa77aed4a8ee1841517b1 (patch) | |
tree | c8f77d25bebc844d62033befdb1365b394cff8db | |
parent | a12a05c2199422d671f756f3bcb4f632efd08aff (diff) | |
download | ansible-9b693235f0655293fd3fa77aed4a8ee1841517b1.tar.gz |
Fix backwards compatibility of constants.get_config
get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.
-rw-r--r-- | lib/ansible/constants.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 049febd2c9..ab0d0bc441 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -15,7 +15,7 @@ from string import ascii_letters, digits from ansible.module_utils._text import to_text from ansible.module_utils.parsing.convert_bool import boolean, BOOLEANS_TRUE from ansible.module_utils.six import string_types -from ansible.config.manager import ConfigManager, ensure_type +from ansible.config.manager import ConfigManager, ensure_type, get_ini_config_value def _deprecated(msg): @@ -43,7 +43,7 @@ def get_config(parser, section, key, env_var, default_value, value_type=None, ex value = os.environ.get(env_var, None) if value is None: try: - value = config.get_ini_config(parser, [{'key': key, 'section': section}]) + value = get_ini_config_value(parser, {'key': key, 'section': section}) except: pass if value is None: |