Update config.py

This commit is contained in:
HibiKier 2021-08-11 11:09:02 +08:00 committed by GitHub
parent c2e2dc5609
commit eec810dc6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,15 +204,15 @@ HIBIAPI = HIBIAPI[:-1] if HIBIAPI[-1] == "/" else HIBIAPI
RSSHUBAPP = RSSHUBAPP[:-1] if RSSHUBAPP[-1] == "/" else RSSHUBAPP
# 配置文件应用
if USE_CONFIG_FILE:
config = get_config_data()
if config:
for key in config.keys():
if isinstance(config[key], str):
config[key] = config[key].strip()
if key.find("proxy") != -1:
if not config[key]:
config[key] = None
# if not configs[key] and key.find("PATH") == -1:
# configs[key] = None
globals().update(config)
# if USE_CONFIG_FILE:
# config = get_config_data()
# if config:
# for key in config.keys():
# if isinstance(config[key], str):
# config[key] = config[key].strip()
# if key.find("proxy") != -1:
# if not config[key]:
# config[key] = None
# # if not configs[key] and key.find("PATH") == -1:
# # configs[key] = None
# globals().update(config)