From 25150f13afa82cec11214f26e159d74ec5a4258e Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 23 Feb 2017 19:16:04 +0000 Subject: [PATCH] [Core] Catch None type country in get_peers --- deluge/core/torrent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 1f78055d9..f5c6c7929 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -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,