Skip to content
Draft
Changes from all commits
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
16 changes: 16 additions & 0 deletions plextraktsync/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ def wrap(*args, **kwargs):
cmd(*args, **kwargs)
except EOFError as e:
raise ClickException(f"Program requested terminal, No terminal is connected: {e}")
except KeyboardInterrupt:
# from plextraktsync.factory import logging
# logger = logging.getLogger(__name__)
# logger.error(e)
#
import asyncio

try:
loop = asyncio.get_event_loop()
loop.stop()
loop.close()
except RuntimeError:
pass

# raise ClickException(f"Interrupted! [{e}]") from None
raise ClickException("Interrupted!")
except ClickException as e:
from plextraktsync.factory import logging

Expand Down