From 4bb95955c5ee1e4d5f7aaeec549b4b865d356773 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Sat, 15 Apr 2023 12:58:24 +0200 Subject: reusing error handler --- py/chat.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'py/chat.py') diff --git a/py/chat.py b/py/chat.py index 547c849..7243988 100644 --- a/py/chat.py +++ b/py/chat.py @@ -63,10 +63,5 @@ try: vim.command("normal! a\n\n>>> user\n\n") vim.command("redraw") -except KeyboardInterrupt: - vim.command("normal! a Ctrl-C...") -except URLError as error: - if isinstance(error.reason, socket.timeout): - vim.command("normal! aRequest timeout...") - else: - raise error +except BaseException as error: + handle_completion_error(error) -- cgit v1.2.3