bug: download_models might break with unexpected exception string

add-more-languages
Meng Zhang 2023-04-06 18:33:58 +08:00
parent 86e565fe0a
commit 07b3ce53c9
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ if __name__ == "__main__":
try:
preload(local_files_only=args.prefer_local_files)
except Exception as e:
if "offline" in str(e):
if "offline" in str(e) or "local_files_only" in str(e):
preload(local_files_only=False)
else:
raise e