From 0fd2f30911f9419aa700b1822cc7754e71ee8f43 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 31 Oct 2014 18:43:15 +0800 Subject: [PATCH] lint code --- shadowsocks/common.py | 2 +- shadowsocks/crypto/salsa20_ctr.py | 2 +- shadowsocks/encrypt.py | 2 +- shadowsocks/server.py | 3 ++- shadowsocks/tcprelay.py | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/shadowsocks/common.py b/shadowsocks/common.py index cba287e..d585065 100644 --- a/shadowsocks/common.py +++ b/shadowsocks/common.py @@ -52,7 +52,7 @@ def inet_ntop(family, ipstr): return socket.inet_ntoa(ipstr) elif family == socket.AF_INET6: v6addr = b':'.join((b'%02X%02X' % (ord(i), ord(j))) - for i, j in zip(ipstr[::2], ipstr[1::2])) + for i, j in zip(ipstr[::2], ipstr[1::2])) return v6addr diff --git a/shadowsocks/crypto/salsa20_ctr.py b/shadowsocks/crypto/salsa20_ctr.py index d1910ea..0f5bfb8 100644 --- a/shadowsocks/crypto/salsa20_ctr.py +++ b/shadowsocks/crypto/salsa20_ctr.py @@ -72,7 +72,7 @@ def numpy_xor(a, b): def py_xor_str(a, b): c = [] - for i in xrange(0, len(a)): + for i in range(0, len(a)): c.append(chr(ord(a[i]) ^ ord(b[i]))) return ''.join(c) diff --git a/shadowsocks/encrypt.py b/shadowsocks/encrypt.py index 974785c..4997a6e 100644 --- a/shadowsocks/encrypt.py +++ b/shadowsocks/encrypt.py @@ -61,7 +61,7 @@ def get_table(key): s = m.digest() (a, b) = struct.unpack('