mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 16:29:04 +00:00
PEP8 (a run of lint.sh)
This commit is contained in:
@@ -142,7 +142,7 @@ def handle_torrent_upload(upload_form, uploading_user=None):
|
||||
# Store tracker refs in DB
|
||||
for order, tracker in enumerate(db_trackers):
|
||||
torrent_tracker = models.TorrentTrackers(torrent_id=torrent.id,
|
||||
tracker_id=tracker.id, order=order)
|
||||
tracker_id=tracker.id, order=order)
|
||||
db.session.add(torrent_tracker)
|
||||
|
||||
db.session.commit()
|
||||
@@ -156,8 +156,9 @@ def handle_torrent_upload(upload_form, uploading_user=None):
|
||||
if not os.path.exists(torrent_dir):
|
||||
os.makedirs(torrent_dir)
|
||||
|
||||
torrent_path = os.path.join(torrent_dir, '{}.{}'.format(torrent.id, secure_filename(torrent_file.filename)))
|
||||
torrent_path = os.path.join(torrent_dir, '{}.{}'.format(
|
||||
torrent.id, secure_filename(torrent_file.filename)))
|
||||
torrent_file.save(torrent_path)
|
||||
torrent_file.close()
|
||||
|
||||
return torrent
|
||||
return torrent
|
||||
|
||||
Reference in New Issue
Block a user