fix a bug that can occur when upgrading 1.1 config files

This commit is contained in:
Damien Churchill 2010-12-01 10:21:26 +00:00
parent 3d64f0d8da
commit 14ec9464aa
1 changed files with 4 additions and 1 deletions

View File

@ -259,7 +259,10 @@ what is currently in the config and it could not convert the value
"""
if isinstance(self.__config[key], str):
try:
return self.__config[key].decode("utf8")
except UnicodeDecodeError:
return self.__config[key]
else:
return self.__config[key]