Skip to content

Commit 9120d35

Browse files
committed
chore: improve error handling for session loop
1 parent 7d25d9d commit 9120d35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roborock/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ async def run():
9797
_LOGGER.exception("Uncaught exception in command")
9898
click.echo(f"Error: {sys.exc_info()[1]}", err=True)
9999
finally:
100-
await context.cleanup()
100+
if not context.is_session_mode():
101+
await context.cleanup()
101102

102103
if context.is_session_mode():
103104
# Session mode - run in the persistent loop

0 commit comments

Comments
 (0)