summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-03-30 16:11:17 +0200
committerRob Crittenden <rcritten@redhat.com>2010-03-30 15:11:56 -0400
commit9dd082eb338e7917744d00359ac6ba55b490caee (patch)
tree36401642829cbabf990ad87fffa15d837f75f752 /ipapython
parent918721c1d0ad0b330825aa9e3f464f36e31ad0c1 (diff)
downloadfreeipa-9dd082eb338e7917744d00359ac6ba55b490caee.tar.gz
freeipa-9dd082eb338e7917744d00359ac6ba55b490caee.tar.xz
freeipa-9dd082eb338e7917744d00359ac6ba55b490caee.zip
Fix http(s)_request in dogtag. Was blowing up because of unicode strings.
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/dogtag.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipapython/dogtag.py b/ipapython/dogtag.py
index 693c0da8d..c6b3a5dc4 100644
--- a/ipapython/dogtag.py
+++ b/ipapython/dogtag.py
@@ -66,6 +66,8 @@ def https_request(host, port, url, secdir, password, nickname, **kw):
Perform a client authenticated HTTPS request
"""
+ if isinstance(host, unicode):
+ host = host.encode('utf-8')
uri = 'https://%s:%d%s' % (host, port, url)
post = urlencode(kw)
logging.info('sslget %r', uri)
@@ -101,6 +103,8 @@ def http_request(host, port, url, **kw):
Perform an HTTP request.
"""
+ if isinstance(host, unicode):
+ host = host.encode('utf-8')
uri = 'http://%s:%s%s' % (host, port, url)
post = urlencode(kw)
logging.info('request %r', uri)