Hotfix: Handle size=None in human_readable_size()
This commit is contained in:
parent
38934027a4
commit
bbfcc2e3fe
1 changed files with 2 additions and 0 deletions
|
|
@ -234,6 +234,8 @@ def human_readable_size(size, decimals=0):
|
|||
size = int(size)
|
||||
except ValueError:
|
||||
size = convert_to_bytes(size)
|
||||
except TypeError:
|
||||
size = -1
|
||||
|
||||
# Verify we have a valid size
|
||||
if size < 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue