DBManager: merge PR2342 by medspx (fix #13650)

This commit is contained in:
Giuseppe Sucameli 2015-10-22 21:28:02 +02:00
parent 9419a44537
commit 339fd75655

View File

@ -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)