This commit is contained in:
Miroslav Stampar
2018-10-04 13:42:13 +02:00
parent eba01ee74e
commit 3984b94297
8 changed files with 35 additions and 30 deletions

View File

@@ -4727,6 +4727,8 @@ def getSafeExString(ex, encoding=None):
retVal = ex.message
elif getattr(ex, "msg", None):
retVal = ex.msg
elif isinstance(ex, (list, tuple)) and len(ex) > 1 and isinstance(ex[1], basestring):
retVal = ex[1]
return getUnicode(retVal or "", encoding=encoding).strip()