From 97801a0fba2f4bb9409bb7a2b2bfec0344c53838 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Thu, 13 Apr 2023 21:31:17 +0200 Subject: implemented request_timeout --- py/complete.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/complete.py') diff --git a/py/complete.py b/py/complete.py index 8a8bf7d..29eb760 100644 --- a/py/complete.py +++ b/py/complete.py @@ -50,3 +50,8 @@ try: render_text_chunks(text_chunks) 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 -- cgit v1.2.3