From cc231a416c3466d8616d74a9187f89bb9dc2e0ad Mon Sep 17 00:00:00 2001 From: evilhero Date: Tue, 10 Jan 2017 18:47:20 -0500 Subject: [PATCH] FIX:(#1523) filesize of torrent polled from an rss feed has a comma in the size field --- mylar/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mylar/helpers.py b/mylar/helpers.py index 9f82b0e7..84d1f9f9 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -162,7 +162,7 @@ def human2bytes(s): """ symbols = ('B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y') letter = s[-1:].strip().upper() - num = s[:-1] + num = re.sub(',', '', s[:-1]) #assert num.isdigit() and letter in symbols #use below assert statement to handle sizes with decimal places assert float(num) and letter in symbols