From 47b7897402609cb058cfd3ada7dc6abcd3345287 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Sun, 1 Apr 2018 02:51:33 +0200 Subject: [PATCH] fix exeption handling in case of empty announce list --- indexer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indexer.py b/indexer.py index ee516d5..0e9fa39 100644 --- a/indexer.py +++ b/indexer.py @@ -135,7 +135,10 @@ def createNewTorrent(reuqest): try: announce = bcoded[b'announce-list'] except KeyError: - announce = (bcoded[b'announce'], ) + try: + announce = (bcoded[b'announce'], ) + except KeyError: + announce = [] is_ours = False for a in announce: