tools: recognize size units regardless of case
This commit is contained in:
parent
9a26eec1ac
commit
f42b8d0721
@ -70,7 +70,7 @@ def parse_size(size):
|
|||||||
return int(size)
|
return int(size)
|
||||||
|
|
||||||
for unit, multiplier in units:
|
for unit, multiplier in units:
|
||||||
if size.endswith(unit):
|
if size.endswith(unit.upper()):
|
||||||
size = size[:-len(unit)].strip()
|
size = size[:-len(unit)].strip()
|
||||||
return int(size) * multiplier
|
return int(size) * multiplier
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user