In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote:
> "Martin v. Löwis" wrote: > > > e is an exception object, not a Unicode object. > > Er, sure, thanks for pointing that out. At first sight he should > substitute "e" with "e.message" then since he tries to convert to > string (for display?). No. e.message is only set if the exeption object receives exactly one argument. That is why my replacement code reads: errStr = ",".join([unicode(s) for s in f.args]) self.setState(self.Failed, errStr) (where e is an Exception of some kind) Notice that I'm iterating over the args. But again, this is far messier than: self.setState(self.Failed, str(e) So...to repeat the original question, is there any simpler unicode-safe replacement for str(exception)? -- Russell
-- http://mail.python.org/mailman/listinfo/python-list