summaryrefslogtreecommitdiff
path: root/swiftclient/command_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/command_helpers.py')
-rw-r--r--swiftclient/command_helpers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/swiftclient/command_helpers.py b/swiftclient/command_helpers.py
index 49ccad1..f37040f 100644
--- a/swiftclient/command_helpers.py
+++ b/swiftclient/command_helpers.py
@@ -143,7 +143,11 @@ def print_container_stats(items, headers, output_manager):
def stat_object(conn, options, container, obj):
req_headers = split_request_headers(options.get('header', []))
- headers = conn.head_object(container, obj, headers=req_headers)
+ query_string = None
+ if options.get('version_id') is not None:
+ query_string = 'version-id=%s' % options['version_id']
+ headers = conn.head_object(container, obj, headers=req_headers,
+ query_string=query_string)
items = []
if options['verbose'] > 1:
path = '%s/%s/%s' % (conn.url, container, obj)