localhost=127.0.0.1
"""
-import ConfigParser
+import configparser
import logging
import os
import shlex
dest[name] = options.get(section_name, name)
# define your defaults here
-options = ConfigParser.SafeConfigParser()
+options = configparser.SafeConfigParser()
def save_options(filename, options):
try:
ini_stream = open(filename, 'w')
options.write(ini_stream)
ini_stream.close()
- except IOError, e:
+ except IOError as e:
LOGGER.debug("Error saving setting: %s" % (str(e)))
INI_FILE = options.read([os.path.expanduser("~/.htsworkflow.ini"),
options_to_list(options, NOTIFICATION_BCC, 'frontend', 'notification_bcc')
if not options.has_option('frontend', 'database'):
- raise ConfigParser.NoSectionError(
+ raise configparser.NoSectionError(
"Please define [frontend] database=<Section>")
database_section = options.get('frontend', 'database')
if not options.has_section(database_section):
- raise ConfigParser.NoSectionError(
+ raise configparser.NoSectionError(
"No database=<database_section_name> defined")
# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.