From 630c69727d8450a8e8b8d53097d1e159024086df Mon Sep 17 00:00:00 2001 From: TheAMM Date: Mon, 13 Nov 2017 23:01:58 +0200 Subject: [PATCH] Torrent validation: explicitly mention missing announce-key --- nyaa/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nyaa/forms.py b/nyaa/forms.py index db575b0..335f04a 100644 --- a/nyaa/forms.py +++ b/nyaa/forms.py @@ -417,6 +417,7 @@ class ReportActionForm(FlaskForm): def _validate_trackers(torrent_dict, tracker_to_check_for=None): announce = torrent_dict.get('announce') + assert announce is not None, 'no tracker in torrent' announce_string = _validate_bytes(announce, 'announce', test_decode='utf-8') tracker_found = tracker_to_check_for and (