tools: recognize size units regardless of case

This commit is contained in:
Marek Marczykowski-Górecki 2017-03-13 04:31:38 +01:00
parent 9a26eec1ac
commit f42b8d0721
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -70,7 +70,7 @@ def parse_size(size):
return int(size)
for unit, multiplier in units:
if size.endswith(unit):
if size.endswith(unit.upper()):
size = size[:-len(unit)].strip()
return int(size) * multiplier