Update data_source.py

This commit is contained in:
HibiKier 2021-07-01 10:32:46 +08:00 committed by GitHub
parent b247100167
commit 2725967df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,8 @@ async def search_online_setu(url: str):
def get_setu(index: str, setu_data: dict, tag: str = None):
if not os.path.exists(IMAGE_PATH + path):
os.mkdir(IMAGE_PATH + path)
length = len(os.listdir(IMAGE_PATH + path))
if length == 0:
return None, None