From bede0a0eb636530c924034f0e477553440d6fc65 Mon Sep 17 00:00:00 2001 From: Kieran Spear Date: Mon, 11 Nov 2013 13:39:02 +1100 Subject: [PATCH] Quote URL in curl output to handle query params Copy and pasting the generated curl output into a shell doesn't work when the URL includes an ampersand, as the URL isn't quoted. Closes-Bug: #1249891 Change-Id: Ic3d7682a2c034e89c3367c858ea33510f8cbc7d4 --- keystoneclient/httpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 5887faf40..286c40915 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -95,7 +95,7 @@ def request(url, method='GET', headers=None, original_ip=None, debug=False, if method: string_parts.append(' -X %s' % method) - string_parts.append(' %s' % url) + string_parts.append(" '%s'" % url) if headers: for header in six.iteritems(headers):