|
|
@ -95,6 +95,7 @@ def do_ini(module, filename, section=None, option=None, value=None, state='prese
|
|
|
|
|
|
|
|
|
|
|
|
changed = False
|
|
|
|
changed = False
|
|
|
|
cp = ConfigParser.ConfigParser()
|
|
|
|
cp = ConfigParser.ConfigParser()
|
|
|
|
|
|
|
|
cp.optionxform = identity
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
f = open(filename)
|
|
|
|
f = open(filename)
|
|
|
@ -150,6 +151,19 @@ def do_ini(module, filename, section=None, option=None, value=None, state='prese
|
|
|
|
|
|
|
|
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ==============================================================
|
|
|
|
|
|
|
|
# identity
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def identity(arg):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
This function simply returns its argument. It serves as a
|
|
|
|
|
|
|
|
replacement for ConfigParser.optionxform, which by default
|
|
|
|
|
|
|
|
changes arguments to lower case. The identity function is a
|
|
|
|
|
|
|
|
better choice than str() or unicode(), because it is
|
|
|
|
|
|
|
|
encoding-agnostic.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
return arg
|
|
|
|
|
|
|
|
|
|
|
|
# ==============================================================
|
|
|
|
# ==============================================================
|
|
|
|
# main
|
|
|
|
# main
|
|
|
|
|
|
|
|
|
|
|
|