[Pkg-privacy-commits] [obfsproxy] 296/353: Add a compatibility layer for Twisted's UnsupportedAddressFamily.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:13 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 befd673af04f1b7d1d7d4a3c92a824b61084b4fe
Author: George Kadianakis <desnacked at riseup.net>
Date: Fri Apr 25 20:21:39 2014 +0100
Add a compatibility layer for Twisted's UnsupportedAddressFamily.
twisted.internet.error.UnsupportedAddressFamily was added in twisted-12.1.0.
This commit adds a stub that emulates it for platforms that don't have a
recent Twisted (e.g. Debian squeeze/wheezy).
---
obfsproxy/network/socks5.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/obfsproxy/network/socks5.py b/obfsproxy/network/socks5.py
index f59ed73..88d0b3c 100644
--- a/obfsproxy/network/socks5.py
+++ b/obfsproxy/network/socks5.py
@@ -41,6 +41,15 @@ _SOCKS_RFC1929_VER = 0x01
_SOCKS_RFC1929_SUCCESS = 0x00
_SOCKS_RFC1929_FAIL = 0x01
+# This is a compatibility layer for twisted.internet.error.UnsupportedAddressFamily
+# which was added in twisted-12.1.0.
+# Defining this function should make older Twisted run properly (sorry for the kludge!)
+if not hasattr(error, "UnsupportedAddressFamily"):
+ class UnsupportedAddressFamily(Exception):
+ """ AKA EAFNOSUPPORT """
+ pass
+
+ error.UnsupportedAddressFamily = UnsupportedAddressFamily
class SOCKSv5Reply(object):
"""
--
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