mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Catch all exceptions when cache images
This commit is contained in:
parent
2a20785a94
commit
638bee475c
@ -110,7 +110,7 @@ class PlayerStatsPlugins(Plugin):
|
|||||||
async def _download_resource(self, url: str) -> str:
|
async def _download_resource(self, url: str) -> str:
|
||||||
try:
|
try:
|
||||||
return await self.download_resource(url)
|
return await self.download_resource(url)
|
||||||
except UrlResourcesNotFoundError:
|
except Exception:
|
||||||
path = Path(url)
|
path = Path(url)
|
||||||
file_path = RESOURCE_DIR / "img" / "city" / path.name
|
file_path = RESOURCE_DIR / "img" / "city" / path.name
|
||||||
if file_path.exists():
|
if file_path.exists():
|
||||||
|
Loading…
Reference in New Issue
Block a user