Skip to content
Merged
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
8 changes: 8 additions & 0 deletions click_repl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
import six
from .exceptions import InternalCommandException, ExitReplException # noqa

# Handle click.exceptions.Exit introduced in Click 7.0
try:
from click.exceptions import Exit as ClickExit
except ImportError:
class ClickExit(RuntimeError):
pass

PY2 = sys.version_info[0] == 2

Expand Down Expand Up @@ -243,6 +249,8 @@ def get_command():
ctx.exit()
except click.ClickException as e:
e.show()
except ClickExit:
pass
except SystemExit:
pass
except ExitReplException:
Expand Down