[Pkg-privacy-commits] [obfsproxy] 279/353: Trivial tweaks to #11329 fix.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfsproxy.
commit fc5bb113528c59729f3198612a47e7098daecaf3
Author: George Kadianakis <desnacked at riseup.net>
Date: Thu Mar 27 17:29:27 2014 +0000
Trivial tweaks to #11329 fix.
---
obfsproxy/network/socks5.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/obfsproxy/network/socks5.py b/obfsproxy/network/socks5.py
index 8463628..0abb9c1 100644
--- a/obfsproxy/network/socks5.py
+++ b/obfsproxy/network/socks5.py
@@ -499,11 +499,13 @@ class _ByteBuffer(bytearray):
ntohs (bool): Convert from network byte order?
"""
- foo = str(self[0:2])
+
+ # Casting to string to workaround http://bugs.python.org/issue10212
+ tmp_string = str(self[0:2])
if ntohs:
- ret = struct.unpack("!H", foo)[0]
+ ret = struct.unpack("!H", tmp_string)[0]
else:
- ret = struct.unpack("H", foo)[0]
+ ret = struct.unpack("H", tmp_string)[0]
del self[0:2]
return ret
@@ -531,11 +533,12 @@ class _ByteBuffer(bytearray):
ntohl (bool): Convert from network byte order?
"""
- foo = str(self[0:4])
+ # Casting to string to workaround http://bugs.python.org/issue10212
+ tmp_string = str(self[0:4])
if ntohl:
- ret = struct.unpack("!I", foo)[0]
+ ret = struct.unpack("!I", tmp_string)[0]
else:
- ret = struct.unpack("I", foo)[0]
+ ret = struct.unpack("I", tmp_string)[0]
del self[0:4]
return ret
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git
More information about the Pkg-privacy-commits
mailing list