Skip to content
Snippets Groups Projects
Commit 28cbc64f authored by Damian Johnson's avatar Damian Johnson
Browse files

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
parent 842da03c
No related branches found
No related tags found
No related merge requests found
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment