3174: Round up, not down, when reporting file sizes in KB.
[arvados.git] / sdk / python / bin / arv-ls
index 9cfd5e4e21726121e7f2f919aff9fa2144816fad..cccce59c812c9654aa9a730fce8fe0d68ca04469 100755 (executable)
@@ -28,6 +28,7 @@ cr = arvados.CollectionReader(arvados.Keep.get(args.locator))
 
 for f in cr.all_files():
     if args.s:
-        print "{:>10} {}".format(f.size() / 1024, f.stream_name() + "/" + f.name())
+        print "{:>10} {}".format((f.size() + 1023) / 1024,
+                                 f.stream_name() + "/" + f.name())
     else:
         print f.stream_name() + "/" + f.name()