mirror of
https://github.com/evilhero/mylar
synced 2024-12-24 16:51:42 +00:00
FIX:(#1523) filesize of torrent polled from an rss feed has a comma in the size field
This commit is contained in:
parent
f2cb786b69
commit
cc231a416c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue