Skip to content

Commit

Permalink
修正变量名
Browse files Browse the repository at this point in the history
  • Loading branch information
Suisuroru committed Sep 15, 2024
1 parent 02ad82b commit 271a42a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Suya_Downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,28 +267,28 @@ def load_json(data):
def get_config(initialize_tag):
try:
with open(default_api_setting_path, "r", encoding="utf-8") as file:
default_global_config = {"default_api_settings": json.load(file)}
print("读取到初始参数:", default_global_config)
default_suya_config = {"default_api_settings": json.load(file)}
print("读取到初始参数:", default_suya_config)
except:
get_admin()
if os.name == "nt":
try:
default_global_config["initialize_path"] = (fr"C:\Users\{getuser()}\AppData\Local\Suya_Downloader\\"
fr"{default_global_config["default_api_settings"]["Server_Name"]}")
default_suya_config["initialize_path"] = (fr"C:\Users\{getuser()}\AppData\Local\Suya_Downloader\\"
fr"{default_suya_config["default_api_settings"]["Server_Name"]}")
except:
print("出现异常:" + str(Exception))
print("最终initialize_path:", default_global_config["initialize_path"])
print("最终initialize_path:", default_suya_config["initialize_path"])
elif os.name == "posix":
try:
default_global_config[
"initialize_path"] = fr"{os.getcwd()}\{default_global_config["default_api_settings"]["Server_Name"]}"
default_suya_config[
"initialize_path"] = fr"{os.getcwd()}\{default_suya_config["default_api_settings"]["Server_Name"]}"
except:
print("异常错误")
try:
final_suya_config = merge_jsons(suya_config_path, default_global_config)
final_suya_config = merge_jsons(suya_config_path, default_suya_config)
print("初次合并结果:", final_suya_config)
except:
final_suya_config = default_global_config
final_suya_config = default_suya_config
print("出现异常:" + str(Exception))
try:
if final_suya_config["debug"]:
Expand Down

0 comments on commit 271a42a

Please sign in to comment.