diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-04-13 21:31:17 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-04-13 21:38:43 +0200 |
| commit | 97801a0fba2f4bb9409bb7a2b2bfec0344c53838 (patch) | |
| tree | 7ecdcf5d4b5266695d57b635ab8f8e8faa4c6666 /py/complete.py | |
| parent | 9a872803baf77b9a687b263d11cb2ac297b57a71 (diff) | |
| download | vim-ai-97801a0fba2f4bb9409bb7a2b2bfec0344c53838.tar.gz | |
implemented request_timeout
Diffstat (limited to 'py/complete.py')
| -rw-r--r-- | py/complete.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |