Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion roborock/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ def wrapper(*args, **kwargs):
context: RoborockContext = ctx.obj

async def run():
return await func(*args, **kwargs)
try:
await func(*args, **kwargs)
except Exception:
_LOGGER.exception("Uncaught exception in command")
click.echo(f"Error: {sys.exc_info()[1]}", err=True)
Comment thread
allenporter marked this conversation as resolved.
Outdated
Comment thread
allenporter marked this conversation as resolved.
Outdated
finally:
await context.cleanup()
Comment thread
allenporter marked this conversation as resolved.
Outdated

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