"""Common functions for accessing the HTS Workflow REST API
"""
import base64
-from ConfigParser import SafeConfigParser
+from six.moves import configparser
import random
import logging
"""Add options OptParser configure authentication options
"""
# Load defaults from the config files
- config = SafeConfigParser()
+ config = configparser.SafeConfigParser()
config.read([os.path.expanduser('~/.htsworkflow.ini'),
'/etc/htsworkflow.ini'
])
"""
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]