diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 19:16:04 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 19:18:01 +0000 |
commit | 25150f13afa82cec11214f26e159d74ec5a4258e (patch) | |
tree | 6af5c0ca309a42c09d964ceb7d33328ab44488bf | |
parent | 7cde3efb9462e56896a66bd8beb5a9c1306ba1db (diff) | |
download | deluge-25150f13afa82cec11214f26e159d74ec5a4258e.tar.gz deluge-25150f13afa82cec11214f26e159d74ec5a4258e.tar.bz2 deluge-25150f13afa82cec11214f26e159d74ec5a4258e.zip |
[Core] Catch None type country in get_peers
-rw-r--r-- | deluge/core/torrent.py | 5 |
1 files changed, 4 insertions, 1 deletions
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, |