summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2012-05-17 22:55:48 +0200
committerLegrandin <gooksankoo@hoiptorrow.mailexpire.com>2012-05-17 22:55:48 +0200
commit5e78b3f67c62d4df785f2b27eb1ed782d997e558 (patch)
treee77054eaf4cc1245407037bf41ed54ac000787b9
parent30a374dd4056ee54a05e78edb3d4fe666a9a8769 (diff)
downloadpycrypto-5e78b3f67c62d4df785f2b27eb1ed782d997e558.tar.gz
Fix to make Crypto.Cipher work with Python3 again
-rw-r--r--lib/Crypto/Cipher/blockalgo.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Crypto/Cipher/blockalgo.py b/lib/Crypto/Cipher/blockalgo.py
index 8863a7d..8619a8a 100644
--- a/lib/Crypto/Cipher/blockalgo.py
+++ b/lib/Crypto/Cipher/blockalgo.py
@@ -21,7 +21,9 @@
# ===================================================================
"""Module with definitions common to all block ciphers."""
-from Crypto.Util.py21compat import *
+import sys
+if sys.version_info[0] == 2 and sys.version_info[1] == 1:
+ from Crypto.Util.py21compat import *
from Crypto.Util.py3compat import *
#: *Electronic Code Book (ECB)*.