

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

dataset/ETHPy150Open bear/python-indieweb/indieweb.py loadConfig/original