Commit 81151510 authored by Thomas Pointhuber's avatar Thomas Pointhuber

[fix] pep8

parent c19b0899
...@@ -80,16 +80,16 @@ def response(resp): ...@@ -80,16 +80,16 @@ def response(resp):
# convert filesize to byte if possible # convert filesize to byte if possible
try: try:
filesize = float(filesize) filesize = float(filesize)
# convert filesize to byte # convert filesize to byte
if filesize_multiplier == 'TB': if filesize_multiplier == 'TB':
filesize = int(filesize * 1024*1024*1024*1024) filesize = int(filesize * 1024 * 1024 * 1024 * 1024)
elif filesize_multiplier == 'GB': elif filesize_multiplier == 'GB':
filesize = int(filesize * 1024*1024*1024) filesize = int(filesize * 1024 * 1024 * 1024)
elif filesize_multiplier == 'MB': elif filesize_multiplier == 'MB':
filesize = int(filesize * 1024*1024) filesize = int(filesize * 1024 * 1024)
elif filesize_multiplier == 'kb': elif filesize_multiplier == 'kb':
filesize = int(filesize * 1024) filesize = int(filesize * 1024)
except: except:
filesize = None filesize = None
...@@ -100,7 +100,7 @@ def response(resp): ...@@ -100,7 +100,7 @@ def response(resp):
files = None files = None
magnetlink = result.xpath(magnet_xpath)[0].attrib['href'] magnetlink = result.xpath(magnet_xpath)[0].attrib['href']
torrentfile = result.xpath(torrent_xpath)[0].attrib['href'] torrentfile = result.xpath(torrent_xpath)[0].attrib['href']
# append result # append result
...@@ -112,7 +112,7 @@ def response(resp): ...@@ -112,7 +112,7 @@ def response(resp):
'filesize': filesize, 'filesize': filesize,
'files': files, 'files': files,
'magnetlink': magnetlink, 'magnetlink': magnetlink,
'torrentfile':torrentfile, 'torrentfile': torrentfile,
'template': 'torrent.html'}) 'template': 'torrent.html'})
# return results sorted by seeder # return results sorted by seeder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment