From 2b1c40df22f92811456377b9227e6205b4e81298 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 29 Jan 2017 07:10:56 +0300 Subject: preserve connection errors --- vk/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vk/api.py') 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() -- cgit v1.2.3