[stem/master] Client usage example didn't work with python3

commit 28cbc64f9098cccf1d74d636bce09d714b35f0a3 Author: Damian Johnson <atagar@torproject.org> Date: Sat Jul 4 15:54:32 2015 -0700 Client usage example didn't work with python3 Good point from Priler that our example should use BytesIO rather than StringIO to work under python3... https://trac.torproject.org/projects/tor/ticket/16502 --- docs/_static/example/client_usage_using_pycurl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/example/client_usage_using_pycurl.py b/docs/_static/example/client_usage_using_pycurl.py index a15db5e..48ebdac 100644 --- a/docs/_static/example/client_usage_using_pycurl.py +++ b/docs/_static/example/client_usage_using_pycurl.py @@ -1,5 +1,5 @@ +import io import pycurl -import StringIO import stem.process @@ -13,7 +13,7 @@ def query(url): Uses pycurl to fetch a site using the proxy on the SOCKS_PORT. """ - output = StringIO.StringIO() + output = io.BytesIO() query = pycurl.Curl() query.setopt(pycurl.URL, url)
participants (1)
-
atagar@torproject.org