diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-29 07:10:56 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-29 07:10:56 +0300 |
commit | 2b1c40df22f92811456377b9227e6205b4e81298 (patch) | |
tree | 3821c5b6bd7d677f2efffe65ef917b6c7f129b3c | |
parent | ignore logs, CSV/JSON files, etc. (diff) | |
download | vk-scripts-2b1c40df22f92811456377b9227e6205b4e81298.tar.gz vk-scripts-2b1c40df22f92811456377b9227e6205b4e81298.zip |
preserve connection errors
-rw-r--r-- | vk/api.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |