fix exeption handling in case of empty announce list
This commit is contained in:
parent
e351a61964
commit
47b7897402
1 changed files with 4 additions and 1 deletions
|
@ -135,7 +135,10 @@ def createNewTorrent(reuqest):
|
||||||
try:
|
try:
|
||||||
announce = bcoded[b'announce-list']
|
announce = bcoded[b'announce-list']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
try:
|
||||||
announce = (bcoded[b'announce'], )
|
announce = (bcoded[b'announce'], )
|
||||||
|
except KeyError:
|
||||||
|
announce = []
|
||||||
|
|
||||||
is_ours = False
|
is_ours = False
|
||||||
for a in announce:
|
for a in announce:
|
||||||
|
|
Loading…
Reference in a new issue