Skip to content

Commit 339fd75

Browse files
committed
DBManager: merge PR2342 by medspx (fix #13650)
1 parent 9419a44 commit 339fd75

File tree

1 file changed

+2
-1
lines changed
  • python/plugins/db_manager/db_plugins

1 file changed

+2
-1
lines changed

python/plugins/db_manager/db_plugins/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def __init__(self, e):
3737
else:
3838
msg = e
3939

40-
msg = unicode(val, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
40+
if not isinstance(msg, unicode):
41+
msg = unicode(msg, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
4142

4243
self.msg = msg
4344
Exception.__init__(self, msg)

0 commit comments

Comments
 (0)