diff options
Diffstat (limited to 'module/utils')
-rw-r--r-- | module/utils/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/utils/__init__.py b/module/utils/__init__.py index 901f553e7..ca00f9abe 100644 --- a/module/utils/__init__.py +++ b/module/utils/__init__.py @@ -108,7 +108,7 @@ def bits_set(bits, compare): def parseFileSize(string, unit=None): #returns bytes if not unit: - m = re.match(r"(\d*[\.,]?\d+)(.*)", string.strip().lower()) + m = re.match(r"([\d.,]+) *([a-zA-Z]*)", string.strip().lower()) if m: traffic = float(m.group(1).replace(",", ".")) unit = m.group(2) |