[IMP] tools.ustr: fix possible stack overflow for exception_to_unicode + tabs->spaces
bzr revid: odo@openerp.com-20111007144806-lodke0woag32sin5
This commit is contained in:
parent
5d8e9b91e5
commit
5aca6a91fa
|
@ -168,7 +168,7 @@ def exception_to_unicode(e):
|
|||
if hasattr(e, 'args'):
|
||||
return "\n".join((ustr(a) for a in e.args))
|
||||
try:
|
||||
return ustr(e)
|
||||
return unicode(e)
|
||||
except Exception:
|
||||
return u"Unknown message"
|
||||
|
||||
|
|
Loading…
Reference in New Issue