diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-09 18:29:42 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-09 18:29:42 +0200 |
commit | 18eb66b6aec6abcb0c18f6fdb333b42484d656b0 (patch) | |
tree | e1c4271f3eec0289ece071b156ed92e2ddf31cfc /module/Utils.py | |
parent | Add tooltips to the Activity bar (diff) | |
parent | updated js/mootools, some parts now coffeescript (diff) | |
download | pyload-18eb66b6aec6abcb0c18f6fdb333b42484d656b0.tar.xz |
Merged in mineo/pyload (pull request #1)
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() |