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

pull/4428/head
Robert Parrott 11 years ago
parent 35a3419bee
commit 762135915c

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

Loading…
Cancel
Save