summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/srpauth.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-29 11:38:14 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-29 11:38:14 -0300
commit4b12d6f003e9b7f4d85e711e78cb186109ec2660 (patch)
tree9fba964baabe5a10751663b4e61f3c0d06e43ecb /src/leap/bitmask/crypto/srpauth.py
parent856a3301b025f3d14c36a0ec0c90563358780670 (diff)
parent6c924e87562f5eb986f6e6bf592e2a9d41fa90f1 (diff)
Merge remote-tracking branch 'kali/pin-requests-dep' into develop
Diffstat (limited to 'src/leap/bitmask/crypto/srpauth.py')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index 47ed21b0..e7998e62 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -31,6 +31,7 @@ from PySide import QtCore
from twisted.internet import threads
from leap.bitmask.util import request_helpers as reqhelper
+from leap.bitmask.util.compat import requests_has_max_retries
from leap.bitmask.util.constants import REQUEST_TIMEOUT
from leap.common.check import leap_assert
from leap.common.events import signal as events_signal
@@ -184,7 +185,11 @@ class SRPAuth(QtCore.QObject):
# NOTE: This is a workaround for the moment, the server
# side seems to return correctly every time, but it fails
# on the client end.
- self._session.mount('https://', HTTPAdapter(max_retries=30))
+ if requests_has_max_retries:
+ adapter = HTTPAdapter(max_retries=30)
+ else:
+ adapter = HTTPAdapter()
+ self._session.mount('https://', adapter)
def _safe_unhexlify(self, val):
"""