summaryrefslogtreecommitdiff
path: root/keystoneclient/httpclient.py
diff options
context:
space:
mode:
authorKieran Spear <kispear@gmail.com>2013-11-11 13:06:52 +1100
committerKieran Spear <kispear@gmail.com>2013-11-11 14:31:18 +1100
commit6a865eab3349895c82b7f5e2cea1aeb5ebee3749 (patch)
tree41226ff3b5230567c08a60bcbc8a03b0f9695c3f /keystoneclient/httpclient.py
parent6454bc2894a43a3dcba0e7a185120dfa6bd732f4 (diff)
downloadpython-keystoneclient-6a865eab3349895c82b7f5e2cea1aeb5ebee3749.tar.gz
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
Diffstat (limited to 'keystoneclient/httpclient.py')
-rw-r--r--keystoneclient/httpclient.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py
index e17e4be..5887faf 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(