diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-04-21 20:18:15 -0700 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-04-21 20:41:18 -0700 |
commit | cce74edc6c792efbe402eca681a7cead4836f543 (patch) | |
tree | 1b8df60558a598496f190a25c4e735f2359b7aa8 /lib/Crypto/SelfTest | |
parent | da01e9d8442b2aaf0dc69d93ac23b982b3288571 (diff) | |
download | pycrypto-cce74edc6c792efbe402eca681a7cead4836f543.tar.gz |
AES-NI support: Python 2.1 Backward compatibility
- METH_NOARGS was introduced in Python 2.2.
- Python 2.1 doesn't have True and False builtins.
Diffstat (limited to 'lib/Crypto/SelfTest')
-rw-r--r-- | lib/Crypto/SelfTest/Cipher/test_AES.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Crypto/SelfTest/Cipher/test_AES.py b/lib/Crypto/SelfTest/Cipher/test_AES.py index a675f8e..c387020 100644 --- a/lib/Crypto/SelfTest/Cipher/test_AES.py +++ b/lib/Crypto/SelfTest/Cipher/test_AES.py @@ -26,8 +26,11 @@ __revision__ = "$Id$" -from common import dict # For compatibility with Python 2.1 and 2.2 +import sys +if sys.version_info[0] == 2 and sys.version_info[1] == 1: + from Crypto.Util.py21compat import * from Crypto.Util.py3compat import * +from common import dict # For compatibility with Python 2.1 and 2.2 from binascii import hexlify # This is a list of (plaintext, ciphertext, key[, description[, params]]) tuples. |