From 5cfe3b56015053eb8a3a41839a9ab8cd5c342596 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 1 Dec 2010 10:21:26 +0000 Subject: [PATCH] fix a bug that can occur when upgrading 1.1 config files --- deluge/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/config.py b/deluge/config.py index 9fe5915eb..74406d213 100644 --- a/deluge/config.py +++ b/deluge/config.py @@ -259,7 +259,10 @@ what is currently in the config and it could not convert the value """ if isinstance(self.__config[key], str): - return self.__config[key].decode("utf8") + try: + return self.__config[key].decode("utf8") + except UnicodeDecodeError: + return self.__config[key] else: return self.__config[key]