summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
authorFlorent Flament <florent.flament-ext@cloudwatt.com>2013-10-11 14:06:35 +0200
committerFlorent Flament <florent.flament-ext@cloudwatt.com>2013-10-11 14:06:35 +0200
commitc81a9edd1f788c3ba034c56000bcff82b940c1c8 (patch)
treecb533c4718cceb25fc87c0bc1553d5c142f3331f /swiftclient/client.py
parent1aa85960fdbf6e570a55821c2361a0747e21a72a (diff)
downloadpython-swiftclient-c81a9edd1f788c3ba034c56000bcff82b940c1c8.tar.gz
Fixes python-swiftclient debugging message
Appends the container's name to the URL displayed, to be used to replay the queries with curl. Replaying the curl commands displayed by "swift --debug list <container>" now works properly. Example: $ swift --debug list test-container ... DEBUG:swiftclient:REQ: curl -i http://10.0.48.134:8080/v1/AUTH_6c554b8dd3d74e44878eddb92caf8687/test-container?format=json -X GET -H ... ... Change-Id: I7ec33d185fedc44a529c016d38f841fde39d20d0 Closes-Bug: #1238612
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index a95ce70..32827d1 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -528,7 +528,8 @@ def get_container(url, token, container, marker=None, limit=None,
conn.request(method, '%s?%s' % (cont_path, qs), '', headers)
resp = conn.getresponse()
body = resp.read()
- http_log(('%s?%s' % (url, qs), method,), {'headers': headers}, resp, body)
+ http_log(('%s%s?%s' % (url.replace(parsed.path, ''), cont_path, qs),
+ method,), {'headers': headers}, resp, body)
if resp.status < 200 or resp.status >= 300:
raise ClientException('Container GET failed',