summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2020-04-21 20:49:24 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2020-05-12 13:43:30 +0300
commitc82c3be2595c42dffefe90508248bc88b232863e (patch)
treee8cd67b317bb6080019e4ba9436d1dad966c9254
parentf8b00c732cc4a9095d7b0d7944232fd6921ffc4d (diff)
downloadpysaml2-c82c3be2595c42dffefe90508248bc88b232863e.tar.gz
Remove compatibility check for py25
``` ************* Module saml2.s_utils src/saml2/s_utils.py:385:42: E0602: Undefined variable 'sha' (undefined-variable) ``` This is referenced on a branch of a backwards compatibility check for py25. This branch will not be reached anymore and it is now removed. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
-rw-r--r--src/saml2/s_utils.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/saml2/s_utils.py b/src/saml2/s_utils.py
index abc53abd..9ffe0001 100644
--- a/src/saml2/s_utils.py
+++ b/src/saml2/s_utils.py
@@ -379,10 +379,7 @@ def signature(secret, parts):
part = part.encode('utf-8')
newparts.append(part)
parts = newparts
- if sys.version_info >= (2, 5):
- csum = hmac.new(secret, digestmod=hashlib.sha1)
- else:
- csum = hmac.new(secret, digestmod=sha)
+ csum = hmac.new(secret, digestmod=hashlib.sha1)
for part in parts:
csum.update(part)