Skip to content

Commit

Permalink
change encode('ascii') to utf8()
Browse files Browse the repository at this point in the history
  • Loading branch information
mankyd committed Jan 23, 2012
1 parent bcb30e5 commit df23c03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tornado/curl_httpclient.py
Expand Up @@ -386,7 +386,7 @@ def ioctl(cmd):
if request.auth_username is not None: if request.auth_username is not None:
userpwd = "%s:%s" % (request.auth_username, request.auth_password or '') userpwd = "%s:%s" % (request.auth_username, request.auth_password or '')
curl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC) curl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
curl.setopt(pycurl.USERPWD, userpwd.encode('ascii')) curl.setopt(pycurl.USERPWD, utf8(userpwd))
logging.debug("%s %s (username: %r)", request.method, request.url, logging.debug("%s %s (username: %r)", request.method, request.url,
request.auth_username) request.auth_username)
else: else:
Expand Down

0 comments on commit df23c03

Please sign in to comment.