aboutsummaryrefslogtreecommitdiff
path: root/requests/packages/urllib3/util/ssl_.py
diff options
context:
space:
mode:
authorSVN-Git Migration <python-modules-team@lists.alioth.debian.org>2015-10-08 13:41:34 -0700
committerSVN-Git Migration <python-modules-team@lists.alioth.debian.org>2015-10-08 13:41:34 -0700
commit2c79b40c98c83e352c5479223d581d69b0e7806c (patch)
tree81c85525061fbc4805ff2ec2280f560956c35d64 /requests/packages/urllib3/util/ssl_.py
parentd075cc8a1294c77c994dc5fd220ecb163ed31b93 (diff)
downloadpython-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar
python-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar.gz
Imported Upstream version 2.4.3
Diffstat (limited to 'requests/packages/urllib3/util/ssl_.py')
-rw-r--r--requests/packages/urllib3/util/ssl_.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/requests/packages/urllib3/util/ssl_.py b/requests/packages/urllib3/util/ssl_.py
index dee4b87..9cfe2d2 100644
--- a/requests/packages/urllib3/util/ssl_.py
+++ b/requests/packages/urllib3/util/ssl_.py
@@ -34,10 +34,9 @@ def assert_fingerprint(cert, fingerprint):
}
fingerprint = fingerprint.replace(':', '').lower()
+ digest_length, odd = divmod(len(fingerprint), 2)
- digest_length, rest = divmod(len(fingerprint), 2)
-
- if rest or digest_length not in hashfunc_map:
+ if odd or digest_length not in hashfunc_map:
raise SSLError('Fingerprint is of invalid length.')
# We need encode() here for py32; works on py2 and p33.