summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-19 21:29:49 +0000
committerGerrit Code Review <review@openstack.org>2018-11-19 21:29:49 +0000
commit73a0b0e683afe2850fc5b28733ac4bbc60c9030f (patch)
treeaca5b3bbf32a5f3426cf0cf6def3e4a905aa4e0d
parent6ac6c21e3b1e0ce33adaa5101acba7101bafa397 (diff)
parentd6cc971de571078708c4e58938d2add850cf7b8f (diff)
Merge "Remove mimetype check when calculating size"
-rwxr-xr-xroles/upload-logs-swift/library/zuul_swift_upload.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/roles/upload-logs-swift/library/zuul_swift_upload.py b/roles/upload-logs-swift/library/zuul_swift_upload.py
index 00522e9..e2aa46c 100755
--- a/roles/upload-logs-swift/library/zuul_swift_upload.py
+++ b/roles/upload-logs-swift/library/zuul_swift_upload.py
@@ -362,10 +362,7 @@ class Indexer():
362 filename) 362 filename)
363 output += '<td>%s</td>' % time.asctime( 363 output += '<td>%s</td>' % time.asctime(
364 file_details.last_modified) 364 file_details.last_modified)
365 if file_details.mimetype == 'folder': 365 size = sizeof_fmt(file_details.size, suffix='')
366 size = str(file_details.size)
367 else:
368 size = sizeof_fmt(file_details.size, suffix='')
369 output += '<td style="text-align: right">%s</td>' % size 366 output += '<td style="text-align: right">%s</td>' % size
370 output += '</tr>\n' 367 output += '</tr>\n'
371 368