Merge pull request #7219 from AlanCoding/config_bug

fix bug with config file [general] section

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-06-02 23:31:45 +00:00
committed by GitHub

View File

@@ -169,7 +169,7 @@ class TowerModule(AnsibleModule):
if try_config_parsing:
# TowerCLI used to support a config file with a missing [general] section by prepending it if missing
if '[general]' not in config_string:
config_string = '[general]{0}'.format(config_string)
config_string = '[general]\n{0}'.format(config_string)
config = ConfigParser()