From 9dd082eb338e7917744d00359ac6ba55b490caee Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Tue, 30 Mar 2010 16:11:17 +0200 Subject: Fix http(s)_request in dogtag. Was blowing up because of unicode strings. --- ipapython/dogtag.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipapython') 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) -- cgit