Commit 92e047cd authored by Martin's avatar Martin

dropped unicode patch, fixed upstream

parent 53fb6ae2
...@@ -2,6 +2,7 @@ python-socksipy (1.5.0+dfsg-1) UNRELEASED; urgency=medium ...@@ -2,6 +2,7 @@ python-socksipy (1.5.0+dfsg-1) UNRELEASED; urgency=medium
* adoption by DPMT (Closes: #700554) * adoption by DPMT (Closes: #700554)
* switch to new upstream and upstream version (Closes: #808872) * switch to new upstream and upstream version (Closes: #808872)
* dropped unicode patch, fixed upstream
-- W. Martin Borgert <debacle@debian.org> Sun, 27 Dec 2015 23:27:03 +0000 -- W. Martin Borgert <debacle@debian.org> Sun, 27 Dec 2015 23:27:03 +0000
......
Description: Allows destination address to be unicode
.
This allows the package to run using python3.
Author: Jean-Michel Nirgal Vourgère <jmv_deb@nirgal.com>
Bug-Debian: https://bugs.debian.org/766752
Forwarded: no
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2014-10-25
Index: python-socksipy-1.02/socks.py
===================================================================
--- python-socksipy-1.02.orig/socks.py
+++ python-socksipy-1.02/socks.py
@@ -212,7 +212,12 @@ class socksocket(socket.socket):
if self.__proxy[3]:
# Resolve remotely
ipaddr = None
- req = req + chr(0x03).encode() + chr(len(destaddr)).encode() + destaddr
+ if type(destaddr) != type(b''): # python3
+ destaddr_bytes = destaddr.encode()
+ # TODO: support "xn--" prefixes as defined by RFC 3490
+ else:
+ destaddr_bytes = destaddr
+ req = req + chr(0x03).encode() + chr(len(destaddr_bytes)).encode() + destaddr_bytes
else:
# Resolve locally
ipaddr = socket.inet_aton(socket.gethostbyname(destaddr))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment