From fb8dc42acf8e656af8f639d1b867397b0913d310 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 66250317e..ce6aecaf1 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -768,7 +768,10 @@ class Torrent(object): except AttributeError: country = '' else: - 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,