use six to work around rename of configparser
[htsworkflow.git] / htsworkflow / util / config_helper.py
index 4b86da4541de29d3c9430eeb9acd92ca9cbf7b46..b14e95d006a79b50dda19897864cc7513b036d79 100644 (file)
@@ -2,20 +2,20 @@
 """
 import logging
 import os
-import ConfigParser
+from six.moves import configparser
 
 from htsworkflow.util.api import make_django_secret_key
 
 LOGGER = logging.getLogger(__name__)
 
-class HTSWConfig(ConfigParser.SafeConfigParser):
+class HTSWConfig(configparser.SafeConfigParser):
     '''Customization of SafeConfigParser that can open and save itself.
     '''
     def __init__(self, path=[os.path.expanduser("~/.htsworkflow.ini"),
                              '/etc/htsworkflow.ini',]):
         # ConfigParser isn't a new-style class? lame
-        # super(ConfigParser.SafeConfigParser, self).__init__()
-        ConfigParser.SafeConfigParser.__init__(self)
+        # super(configparser.SafeConfigParser, self).__init__()
+        configparser.SafeConfigParser.__init__(self)
         read_path = self.read(path)
         if len(read_path) > 0:
             self.filename = read_path[0]