diff options
Diffstat (limited to 'module/Utils.py')
-rw-r--r-- | module/Utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/module/Utils.py b/module/Utils.py index 1fdf2cbc6..939baad96 100644 --- a/module/Utils.py +++ b/module/Utils.py @@ -129,9 +129,7 @@ def uniqify(seq, idfun=None): def parseFileSize(string): #returns bytes - string = string.strip().lower() - p = re.compile(r"(\d+[\.,]\d+)(.*)") - m = p.match(string) + m = re.match(r"(\d*[\.,]?\d+)(.*)", string.strip().lower()) if m: traffic = float(m.group(1).replace(",", ".")) unit = m.group(2).strip() |