This commit is contained in:
yumoqing 2022-04-07 15:02:41 +08:00
parent ed05d9c864
commit 8f903cc2cd

View File

@ -20,13 +20,14 @@ except:
pmp = None
class ConfiguredServer:
def __init__(self,auth_klass=AuthAPI):
pp = ProgramPath()
self.natpmp_loop = True
self.nat_heartbeat = False
workdir = pp
if len(sys.argv) > 1:
workdir = sys.argv[1]
def __init__(self,auth_klass=AuthAPI, workdir=None):
if workdir is None:
pp = ProgramPath()
self.natpmp_loop = True
self.nat_heartbeat = False
workdir = pp
if len(sys.argv) > 1:
workdir = sys.argv[1]
config = getConfig(workdir,{'workdir':workdir,'ProgramPath':pp})
if config.databases:
DBPools(config.databases)