aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-29 07:10:56 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-29 07:10:56 +0300
commit2b1c40df22f92811456377b9227e6205b4e81298 (patch)
tree3821c5b6bd7d677f2efffe65ef917b6c7f129b3c
parentignore logs, CSV/JSON files, etc. (diff)
downloadvk-scripts-2b1c40df22f92811456377b9227e6205b4e81298.tar.gz
vk-scripts-2b1c40df22f92811456377b9227e6205b4e81298.zip
preserve connection errors
-rw-r--r--vk/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/vk/api.py b/vk/api.py
index e942172..eb1914e 100644
--- a/vk/api.py
+++ b/vk/api.py
@@ -102,8 +102,8 @@ class API:
raise vk.error.InvalidAPIResponseError(response)
#print(response)
return response['response']
- except (ConnectionError, URLError):
- raise vk.error.APIConnectionError()
+ except (ConnectionError, URLError) as e:
+ raise vk.error.APIConnectionError(str(e)) from e
def _should_skip_user(self, user):
return self._skip_deactivated_users and user.is_deactivated()