def _config_defaults_section(): cfg = OrderedDict() statements = ["balance %s" % BALANCE, "log global", "mode %s" % MODE] statements.extend(ConfigHelper.config_option(OPTION)) statements.extend(ConfigHelper.config_timeout(TIMEOUT)) statements.extend(ConfigHelper.config_extra_settings(EXTRA_DEFAULT_SETTINGS)) cfg["defaults"] = statements return cfg
def _config_defaults_section(): cfg = OrderedDict() statements = ["balance %s" % BALANCE, "log global", "mode %s" % MODE] statements.extend(ConfigHelper.config_option(OPTION)) statements.extend(ConfigHelper.config_timeout(TIMEOUT)) statements.extend( ConfigHelper.config_extra_settings(EXTRA_DEFAULT_SETTINGS)) cfg["defaults"] = statements return cfg
def _config_defaults_section(): cfg = OrderedDict() statements = ["balance %s" % BALANCE, "log global", "mode %s" % MODE] statements.extend(ConfigHelper.config_option(OPTION)) statements.extend(ConfigHelper.config_timeout(TIMEOUT)) statements.extend( ConfigHelper.config_extra_settings(EXTRA_DEFAULT_SETTINGS)) if EXTRA_DEFAULT_SETTINGS_FILE: try: with open(EXTRA_DEFAULT_SETTINGS_FILE) as file: for line in file: statements.append(line.strip()) except Exception as e: logger.info( "Error reading EXTRA_DEFAULT_SETTINGS_FILE at '%s', error %s" % (EXTRA_DEFAULT_SETTINGS_FILE, e)) cfg["defaults"] = statements return cfg