From bd13457f33ff3cdf7af67e98d0a864e9481a0595 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Fri, 20 Jul 2012 18:16:59 +0200 Subject: [PATCH] Fixed AddTorrents crashing on folders containing unicode characters --- deluge/ui/console/modes/addtorrents.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/modes/addtorrents.py b/deluge/ui/console/modes/addtorrents.py index a18e1e07d..171ea5163 100644 --- a/deluge/ui/console/modes/addtorrents.py +++ b/deluge/ui/console/modes/addtorrents.py @@ -227,7 +227,13 @@ class AddTorrents(BaseMode, component.Component): size_str = "%i items" % size else: size_str = " unknown" - cols = [filename.decode("utf8"), size_str, common.fdate(time)] + + try: + filename = filename.decode("utf8") + except: + pass + + cols = [filename, size_str, common.fdate(time)] widths = [self.cols - 35, 12, 23] self.formatted_rows.append(format_utils.format_row(cols, widths)) else: