Skip to content

Commit

Permalink
fix username password test for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Feb 4, 2015
1 parent 8f9588d commit 039dc0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- rabbitmq
install:
- pip install --allow-all-external -r requirements.txt
- pip install coveralls httpbin pyproxy
- pip install coveralls httpbin pyproxy>=0.1.6
- pip install -e .
script:
- coverage run setup.py test
Expand Down
6 changes: 3 additions & 3 deletions pyspider/fetcher/tornado_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ def http_fetch(self, url, task, callback):
proxy_string = 'http://' + proxy_string
proxy_splited = urlsplit(proxy_string)
if proxy_splited.username:
fetch['proxy_username'] = utils.utf8(proxy_splited.username)
fetch['proxy_username'] = proxy_splited.username
if proxy_splited.password:
fetch['proxy_password'] = utils.utf8(proxy_splited.password)
fetch['proxy_host'] = utils.utf8(proxy_splited.hostname)
fetch['proxy_password'] = proxy_splited.password
fetch['proxy_host'] = proxy_splited.hostname
fetch['proxy_port'] = proxy_splited.port or 8080

# etag
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deps =
-rrequirements.txt
coverage
httpbin
pyproxy>=0.1.4
pyproxy>=0.1.6
install_command = pip install --allow-all-external {opts} {packages}
commands =
coverage erase
Expand Down

0 comments on commit 039dc0a

Please sign in to comment.