mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-25 20:10:28 +08:00
Fix another bug introduced by the last commit
This commit is contained in:
parent
f31baf4623
commit
f87a29f708
@ -521,10 +521,12 @@ async def _real_run_command(session: CommandSession,
|
|||||||
await asyncio.wait_for(future, timeout)
|
await asyncio.wait_for(future, timeout)
|
||||||
handled = future.result()
|
handled = future.result()
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
# if timeout happens, absolutely the command was executed (but may not finished)
|
|
||||||
handled = True
|
handled = True
|
||||||
|
except (_FurtherInteractionNeeded,
|
||||||
|
_FinishException,
|
||||||
|
SwitchException) as e:
|
||||||
|
raise e
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# if any other exception happens, the command was executed but failed
|
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
handled = True
|
handled = True
|
||||||
raise _FinishException(handled)
|
raise _FinishException(handled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user