From 6a865eab3349895c82b7f5e2cea1aeb5ebee3749 Mon Sep 17 00:00:00 2001 From: Kieran Spear Date: Mon, 11 Nov 2013 13:06:52 +1100 Subject: [PATCH] Fix curl debug output for requests with a body Rather than output the request body as a separate line, make it part of the example curl command using the -d option. Partial-Bug: #1249891 Change-Id: Ie3fe4535f554333c67244a13c5698c025f000e7e --- keystoneclient/httpclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index e17e4bea3..5887faf40 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -101,11 +101,11 @@ def request(url, method='GET', headers=None, original_ip=None, debug=False, for header in six.iteritems(headers): string_parts.append(' -H "%s: %s"' % header) - logger.debug("REQ: %s" % "".join(string_parts)) - data = kwargs.get('data') if data: - logger.debug("REQ BODY: %s\n" % data) + string_parts.append(" -d '%s'" % data) + + logger.debug("REQ: %s\n", "".join(string_parts)) try: resp = requests.request(