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