FIX:(#1523) filesize of torrent polled from an rss feed has a comma in the size field

This commit is contained in:
evilhero 2017-01-10 18:47:20 -05:00
parent f2cb786b69
commit cc231a416c
1 changed files with 1 additions and 1 deletions

View File

@ -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