summaryrefslogtreecommitdiffstats
path: root/deluge/core/torrent.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/core/torrent.py')
-rw-r--r--deluge/core/torrent.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index 10d5b4776..f40b58834 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -810,7 +810,11 @@ class Torrent(object):
if peer.flags & peer.connecting or peer.flags & peer.handshake:
continue
- client = decode_bytes(peer.client)
+ try:
+ client = decode_bytes(peer.client)
+ except UnicodeDecodeError:
+ # libtorrent on Py3 can raise UnicodeDecodeError for peer_info.client
+ client = 'unknown'
try:
country = component.get('Core').geoip_instance.country_code_by_addr(