From f87a29f708b784f5b52d627c8b06a17fd2df3b64 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Tue, 11 Dec 2018 11:46:04 +0800 Subject: [PATCH] Fix another bug introduced by the last commit --- none/command.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/none/command.py b/none/command.py index bbd792c8..d1513631 100644 --- a/none/command.py +++ b/none/command.py @@ -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)