Do not crash with "swift list --lh" for Ceph RadosGW.
If 'x-timestamp' header is not present in 'swift list' result, date string cannot be correctly generated. Check for correct exception to catch this case and return a special string value. This is just a workaround for faulty RadosGW behavior. Change-Id: I172843a2668e33efac00924906ff0dca3e790050 Closes-Bug: 1349528
This commit is contained in:
parent
bb4d2ab59c
commit
21fb6f6798
@ -421,7 +421,7 @@ def st_list(parser, args, output_manager):
|
|||||||
float(meta.get('x-timestamp')))
|
float(meta.get('x-timestamp')))
|
||||||
datestamp = strftime(
|
datestamp = strftime(
|
||||||
'%Y-%m-%d %H:%M:%S', utc)
|
'%Y-%m-%d %H:%M:%S', utc)
|
||||||
except ClientException:
|
except TypeError:
|
||||||
datestamp = '????-??-?? ??:??:??'
|
datestamp = '????-??-?? ??:??:??'
|
||||||
if not options.totals:
|
if not options.totals:
|
||||||
output_manager.print_msg(
|
output_manager.print_msg(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user