mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[Core] Catch None type country in get_peers
This commit is contained in:
parent
7cde3efb94
commit
25150f13af
1 changed files with 4 additions and 1 deletions
|
@ -561,7 +561,10 @@ class Torrent(object):
|
|||
except AttributeError:
|
||||
country = peer.country
|
||||
|
||||
country = "".join([char if char.isalpha() else " " for char in country])
|
||||
try:
|
||||
country = "".join([char if char.isalpha() else " " for char in country])
|
||||
except TypeError:
|
||||
country = ""
|
||||
|
||||
ret.append({
|
||||
"client": client,
|
||||
|
|
Loading…
Add table
Reference in a new issue