diff --git a/python/plugins/db_manager/db_plugins/plugin.py b/python/plugins/db_manager/db_plugins/plugin.py index 91188eb7761..fc6baa9cbc1 100644 --- a/python/plugins/db_manager/db_plugins/plugin.py +++ b/python/plugins/db_manager/db_plugins/plugin.py @@ -37,7 +37,8 @@ class BaseError(Exception): else: msg = e - msg = unicode(val, 'utf-8', 'replace') # convert from utf8 and replace errors (if any) + if not isinstance(msg, unicode): + msg = unicode(msg, 'utf-8', 'replace') # convert from utf8 and replace errors (if any) self.msg = msg Exception.__init__(self, msg)