summaryrefslogtreecommitdiff
path: root/py/complete.py
diff options
context:
space:
mode:
authorMartin Bielik <mx.bielik@gmail.com>2023-03-25 18:50:47 +0100
committerMartin Bielik <mx.bielik@gmail.com>2023-03-25 18:52:08 +0100
commitf49d139ee7622ecb16542c346c6c1341afb10bc7 (patch)
tree24a2d00048fd7f0df5f19c395dc8a8d457ce5544 /py/complete.py
parent894f58a9887ad91cb2567b346907b9388debf0c5 (diff)
downloadvim-ai-f49d139ee7622ecb16542c346c6c1341afb10bc7.tar.gz
handle connection timeout errors
Diffstat (limited to '')
-rw-r--r--py/complete.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/complete.py b/py/complete.py
index f82707a..1f32e3e 100644
--- a/py/complete.py
+++ b/py/complete.py
@@ -28,3 +28,5 @@ try:
vim.command("redraw")
except KeyboardInterrupt:
vim.command("normal! a Ctrl-C...")
+except openai.error.Timeout:
+ vim.command("normal! a Connection timeout...")