fix handling of [DEFAULT] section by ConfigParser. it is there by DEFAULT.

reviewable/pr18780/r1
Robert Parrott 11 years ago
parent a715df1e65
commit adaef79aaf

@ -116,10 +116,10 @@ def do_ini(module, filename, section=None, option=None, value=None, state='prese
pass
if state == 'present':
if cp.has_section(section) == False:
if section.upper() == 'DEFAULT':
module.fail_json(msg="[DEFAULT] is an illegal section name")
if section.upper() != 'DEFAULT':
cp.add_section(section)
changed = True

Loading…
Cancel
Save