From c9074b24b98efe18096256ab680535f50691f67d Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sat, 7 Nov 2020 14:49:51 +0800 Subject: [Upload] --- utils/utils_switch/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/utils_switch') diff --git a/utils/utils_switch/__init__.py b/utils/utils_switch/__init__.py index e494712..d4e73db 100644 --- a/utils/utils_switch/__init__.py +++ b/utils/utils_switch/__init__.py @@ -31,7 +31,7 @@ def controlSwitch(func_name: str, try: with open(file_switch_group, 'r') as f: data_switch_group = json.load(f) - except: + except FileNotFoundError: data_switch_group = {} if data_switch_group[f"{func_name}"]: @@ -51,7 +51,7 @@ def controlSwitch(func_name: str, try: with open(file_switch_all, 'r') as f: data_switch_all = json.load(f) - except: + except FileNotFoundError: data_switch_all = {} if data_switch_all[f"{func_name}"]: -- cgit v1.2.3