[Core] Catch None type country in get_peers

This commit is contained in:
Calum Lind 2017-02-23 19:16:04 +00:00
commit fb8dc42acf

View file

@ -768,7 +768,10 @@ class Torrent(object):
except AttributeError: except AttributeError:
country = '' country = ''
else: 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({ ret.append({
'client': client, 'client': client,