fix exeption handling in case of empty announce list

This commit is contained in:
Stefan Rupp 2018-04-01 02:51:33 +02:00
parent e351a61964
commit 47b7897402

View file

@ -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: