Update MessageGen.py
This commit is contained in:
parent
f56bb25358
commit
e1237acf50
1 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ async def makemsgchain(msg, msgtype):
|
|||
try:
|
||||
msgchain = msgchain.plusWith(
|
||||
[Image.fromLocalFile(filepath=abspath(img.group(1)), method=mth)])
|
||||
except TimeoutError:
|
||||
except (TimeoutError, asyncio.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:
|
||||
except (TimeoutError, asyncio.TimeoutError):
|
||||
msgchain = msgchain.plusWith(
|
||||
[Plain('\n上传超时,发送失败。')])
|
||||
except Exception:
|
||||
|
|
Reference in a new issue