diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-04-15 14:53:10 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-04-15 14:53:10 +0200 |
| commit | 550c4e48e23d8e824ee4d1852cbbdfb10d9c911c (patch) | |
| tree | ab521f39f6457fc67d10eb38fb6de0ff7fc72b2b /py | |
| parent | a90021cd98b2aa7f87fc6991ef29d2c4fd9aafd3 (diff) | |
| download | vim-ai-550c4e48e23d8e824ee4d1852cbbdfb10d9c911c.tar.gz | |
fixed error handling
Diffstat (limited to 'py')
| -rw-r--r-- | py/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/py/utils.py b/py/utils.py index 79ff378..4243c4c 100644 --- a/py/utils.py +++ b/py/utils.py @@ -136,8 +136,10 @@ def print_info_message(msg): def handle_completion_error(error): if isinstance(error, KeyboardInterrupt): print_info_message("Completion cancelled...") - if isinstance(error, URLError): + elif isinstance(error, URLError): if isinstance(error.reason, socket.timeout): print_info_message("Request timeout...") else: raise error + else: + raise error |