mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 04:36:44 +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)
|
||||
handled = future.result()
|
||||
except asyncio.TimeoutError:
|
||||
# if timeout happens, absolutely the command was executed (but may not finished)
|
||||
handled = True
|
||||
except (_FurtherInteractionNeeded,
|
||||
_FinishException,
|
||||
SwitchException) as e:
|
||||
raise e
|
||||
except Exception as e:
|
||||
# if any other exception happens, the command was executed but failed
|
||||
logger.exception(e)
|
||||
handled = True
|
||||
raise _FinishException(handled)
|
||||
|
Loading…
Reference in New Issue
Block a user