return s
return None
-class HookeConfigParser (configparser.SafeConfigParser):
- """A wrapper around configparser.SafeConfigParser.
+class HookeConfigParser (configparser.RawConfigParser):
+ """A wrapper around configparser.RawConfigParser.
You will probably only need .read and .write.
"""
def __init__(self, paths=None, default_settings=None, defaults=None,
dict_type=OrderedDict, indent='# ', **kwargs):
- # Can't use super() because SafeConfigParser is a classic class
+ # Can't use super() because RawConfigParser is a classic class
#super(HookeConfigParser, self).__init__(defaults, dict_type)
- configparser.SafeConfigParser.__init__(self, defaults, dict_type)
+ configparser.RawConfigParser.__init__(self, defaults, dict_type)
if paths == None:
paths = []
self._config_paths = paths
for filename in filenames:
if os.path.abspath(os.path.expanduser(filename)) not in paths:
self._config_paths.append(filename)
- # Can't use super() because SafeConfigParser is a classic class
+ # Can't use super() because RawConfigParser is a classic class
#return super(HookeConfigParser, self).read(filenames)
- return configparser.SafeConfigParser.read(self, filenames)
+ return configparser.RawConfigParser.read(self, filenames)
def _write_setting(self, fp, section=None, option=None, value=None,
**kwargs):