Commit b0b87c18 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

modules/vidjil_utils.py: '0' when size is 0

parent 8bcbd930
......@@ -19,6 +19,10 @@ def format_size(n, unit='B'):
>>> format_size(42*(2**40))
'46.2 TB'
'''
if n == 0:
return '0'
size = float(n)
PREFIXES = ['', 'k', 'M', 'G', 'T', 'P']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment