Use RawConfigParser instead of SafeConfigParser as base class in hooke.config.
[hooke.git] / hooke / config.py
index 6d9ccebaea40f448b018bbc1ef6eec54be317ba1..57756a0824a89b956af5cdf4c8bd6f0474242733 100644 (file)
@@ -119,8 +119,8 @@ def get_setting(settings, match):
             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.
 
@@ -147,9 +147,9 @@ class HookeConfigParser (configparser.SafeConfigParser):
     """
     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
@@ -199,9 +199,9 @@ class HookeConfigParser (configparser.SafeConfigParser):
             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):