[tor-commits] [stem/master] Making SocksiPy work with official version
atagar at torproject.org
atagar at torproject.org
Mon May 13 17:01:06 UTC 2013
commit 1b965a4c81d0734d7f94a0283dbdd4b8793c4fa3
Author: Damian Johnson <atagar at torproject.org>
Date: Mon May 13 09:31:33 2013 -0700
Making SocksiPy work with official version
Ashish's SocksiPy was based on a fork of the main project...
https://code.google.com/p/socksipy-branch/
This caused my attempts to run it to fail with...
Traceback (most recent call last):
File "twitter_script", line 12, in <module>
socks.wrapmodule(urllib)
AttributeError: 'module' object has no attribute 'wrapmodule'
Making this work with the official upstream project is trivial so making the
tweak.
---
docs/tutorials/to_russia_with_love.rst | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/docs/tutorials/to_russia_with_love.rst b/docs/tutorials/to_russia_with_love.rst
index da0c05f..9a68bd4 100644
--- a/docs/tutorials/to_russia_with_love.rst
+++ b/docs/tutorials/to_russia_with_love.rst
@@ -24,6 +24,7 @@ In the following example we're using stem to `start Tor <../api/process.html>`_,
::
import StringIO
+ import socket
import urllib
import socks # SocksiPy module
@@ -36,7 +37,7 @@ In the following example we're using stem to `start Tor <../api/process.html>`_,
# Set socks proxy and wrap the urllib module
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', SOCKS_PORT)
- socks.wrapmodule(urllib)
+ socket.socket = socks.socksocket
def query(url):
More information about the tor-commits
mailing list