diff options
author | Mike Crute <mcrute@gmail.com> | 2015-12-05 22:22:17 -0800 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2015-12-05 22:22:17 -0800 |
commit | 62c15a0a45a2f2e086ba71585a0915f88ea7c337 (patch) | |
tree | fbe5aa61ab7da3d0f4540b7d7bdf7fe48ced68f2 /pandora | |
parent | 4a9383e949d1e0aa1748e598e5aa1d775a7caae9 (diff) | |
download | pydora-62c15a0a45a2f2e086ba71585a0915f88ea7c337.tar.bz2 pydora-62c15a0a45a2f2e086ba71585a0915f88ea7c337.tar.xz pydora-62c15a0a45a2f2e086ba71585a0915f88ea7c337.zip |
Remove SysCallError handling and pyOpenSSL
This requires libffi installed on Mac OS X to build the pyOpenSSL
extension which seems like an excessive burden to run pydora. Switched
the logic to catch Exception instead as there aren't any exceptions that
can occur at this level that aren't retryable.
Diffstat (limited to 'pandora')
-rw-r--r-- | pandora/transport.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pandora/transport.py b/pandora/transport.py index 5a30e33..e43a8e3 100644 --- a/pandora/transport.py +++ b/pandora/transport.py | |||
@@ -13,7 +13,6 @@ import random | |||
13 | import time | 13 | import time |
14 | import json | 14 | import json |
15 | import base64 | 15 | import base64 |
16 | from OpenSSL.SSL import SysCallError | ||
17 | import requests | 16 | import requests |
18 | from requests.adapters import HTTPAdapter | 17 | from requests.adapters import HTTPAdapter |
19 | from Crypto.Cipher import Blowfish | 18 | from Crypto.Cipher import Blowfish |
@@ -223,7 +222,7 @@ class APITransport(object): | |||
223 | # TODO: This decorator is a temporary workaround for handling | 222 | # TODO: This decorator is a temporary workaround for handling |
224 | # SysCallErrors, see: https://github.com/shazow/urllib3/issues/367. | 223 | # SysCallErrors, see: https://github.com/shazow/urllib3/issues/367. |
225 | # Should be removed once a fix is applied in urllib3. | 224 | # Should be removed once a fix is applied in urllib3. |
226 | @retries(5, exceptions=(SysCallError,)) | 225 | @retries(5) |
227 | def __call__(self, method, **data): | 226 | def __call__(self, method, **data): |
228 | self._start_request(method) | 227 | self._start_request(method) |
229 | 228 | ||