From 810db996cd4030a2ecfdfe45dbb8ca64af258568 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Thu, 11 Dec 2014 22:54:49 +0800 Subject: [PATCH] disable M2Crypto on Python 3 --- shadowsocks/crypto/m2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shadowsocks/crypto/m2.py b/shadowsocks/crypto/m2.py index 4c7e148..5ad48a8 100644 --- a/shadowsocks/crypto/m2.py +++ b/shadowsocks/crypto/m2.py @@ -33,6 +33,8 @@ try: __import__('M2Crypto') except ImportError: has_m2 = False +if bytes != str: + has_m2 = False def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None, i=1,