summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2020-11-07 14:49:51 +0800
committerKyomotoi <[email protected]>2020-11-07 14:49:51 +0800
commitc9074b24b98efe18096256ab680535f50691f67d (patch)
treefb912e4506e478d3d61e89b2824fc83d69eae7cd /api.py
parent85517a82b9f787ed7c3008655c8dc04d8e6f0a30 (diff)
downloadATRI-c9074b24b98efe18096256ab680535f50691f67d.tar.gz
ATRI-c9074b24b98efe18096256ab680535f50691f67d.tar.bz2
ATRI-c9074b24b98efe18096256ab680535f50691f67d.zip
[Upload]
Diffstat (limited to 'api.py')
-rw-r--r--api.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/api.py b/api.py
index 067ad13..d911f6a 100644
--- a/api.py
+++ b/api.py
@@ -45,7 +45,7 @@ def check_visitors(query: str):
Path('.') / 'ATRI' / 'data' / 'data_HTML' / 'api' / 'data' /
'banip' / 'banip.json', 'r') as f:
data = json.load(f)
- except:
+ except FileNotFoundError:
data = {}
if query in data:
@@ -147,7 +147,7 @@ async def index(request: Request):
Path('.') / 'ATRI' / 'data' / 'data_HTML' / 'api' / 'data' /
'times' / 'api_all.json', 'r') as f:
data_all = json.load(f)
- except:
+ except FileNotFoundError:
data_all = {}
try:
@@ -155,7 +155,7 @@ async def index(request: Request):
Path('.') / 'ATRI' / 'data' / 'data_HTML' / 'api' / 'data' /
'times' / 'api_index.json', 'r') as f:
data_index = json.load(f)
- except:
+ except FileNotFoundError:
data_index = {}
info = await get_ip_info(ip)
@@ -212,7 +212,7 @@ async def get_setu(s_type: str, request: Request):
Path('.') / 'ATRI' / 'data' / 'data_HTML' / 'api' / 'data' /
'times' / 'api_all.json', 'r') as f:
data_all = json.load(f)
- except:
+ except FileNotFoundError:
data_all = {}
try:
@@ -220,7 +220,7 @@ async def get_setu(s_type: str, request: Request):
Path('.') / 'ATRI' / 'data' / 'data_HTML' / 'api' / 'data' /
'times' / 'api_setu.json', 'r') as f:
data_setu = json.load(f)
- except:
+ except FileNotFoundError:
data_setu = {}
info = await get_ip_info(ip)