def loadConfig(configFilename, host=None, port=None, logpath=None): result = Config() result.fromJson(configFilename) if host is not None: result.host = host if port is not None: result.port = port if logpath is not None: result.paths.log = logpath if 'auth_timeout' not in result: result.auth_timeout = 300 return result
def loadConfig(configFilename, host=None, port=None, logpath=None): result = Config() result.fromJson(configFilename) if host is not None: result.host = host if port is not None: result.port = port if logpath is not None: result.paths.log = logpath if 'auth_timeout' not in result: result.auth_timeout = 300 if 'require_vouch' not in result: result.require_vouch = False if 'our_domain' not in result: result.our_domain = baseDomain(result.client_id, includeScheme=False) return result
def loadConfig(configFilename, host=None, port=None, basepath=None, logpath=None): result = Config() result.fromJson(configFilename) if host is not None and 'host' not in result: result.host = host if port is not None and 'port' not in result: result.port = port if basepath is not None and 'basepath' not in result: result.basepath = basepath if logpath is not None and 'logpath' not in result: result.logpath = logpath if 'auth_timeout' not in result: result.auth_timeout = 300 if 'require_vouch' not in result: result.require_vouch = False return result
def loadConfig(configFilename, host=None, port=None, basepath=None, logpath=None): result = Config() result.fromJson(configFilename) if host is not None and "host" not in result: result.host = host if port is not None and "port" not in result: result.port = port if basepath is not None and "basepath" not in result: result.basepath = basepath if logpath is not None and "logpath" not in result: result.logpath = logpath if "auth_timeout" not in result: result.auth_timeout = 300 if "require_vouch" not in result: result.require_vouch = False return result