Archived
1
0
Fork 0
This commit is contained in:
yzhh 2020-10-11 13:27:06 +08:00
parent e1237acf50
commit 61a512979a

View file

@ -97,7 +97,7 @@ async def makemsgchain(msg, msgtype):
try:
msgchain = msgchain.plusWith(
[Image.fromLocalFile(filepath=abspath(img.group(1)), method=mth)])
except (TimeoutError, asyncio.TimeoutError):
except asyncio.exceptions.TimeoutError:
msgchain = msgchain.plusWith(
[Plain('\n上传超时,发送失败。')])
except Exception:
@ -107,7 +107,7 @@ async def makemsgchain(msg, msgtype):
try:
d1 = await findimage(d)
msgchain = msgchain.plusWith([Image.fromNetworkAddress(url=d1, method=mth)])
except (TimeoutError, asyncio.TimeoutError):
except asyncio.exceptions.TimeoutError:
msgchain = msgchain.plusWith(
[Plain('\n上传超时,发送失败。')])
except Exception: