summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-01-18 11:11:00 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2017-01-18 11:11:00 +0000
commit30eaf775c2d5563ecec30d95d5496976f385a6c2 (patch)
treebd40698efb3771260dfa5550d378212b5868c703
parentffb1316f09b7b5a8457159f01fc096cf41eaca13 (diff)
downloaddeluge-30eaf775c2d5563ecec30d95d5496976f385a6c2.tar.gz
deluge-30eaf775c2d5563ecec30d95d5496976f385a6c2.tar.bz2
deluge-30eaf775c2d5563ecec30d95d5496976f385a6c2.zip
[#2948] [Console] Fix decode error comparing non-ascii (str) torrent name
-rw-r--r--deluge/ui/console/main.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py
index 64afc46f5..34db1a999 100644
--- a/deluge/ui/console/main.py
+++ b/deluge/ui/console/main.py
@@ -425,6 +425,7 @@ Please use commands from the command line, eg:\n
for torrent_id, torrent_name in self.torrents:
if torrent_id.startswith(line):
possible_matches.append(torrent_id)
+ torrent_name = deluge.common.decode_string(torrent_name)
if torrent_name.startswith(line):
possible_matches.append(torrent_name)
@@ -459,6 +460,7 @@ Please use commands from the command line, eg:\n
ret = []
string = string.decode(self.encoding)
for tid, name in self.torrents:
+ name = deluge.common.decode_string(name)
if tid.startswith(string) or name.startswith(string):
ret.append(tid)