[Twisted-Python] twisted.web.error.Error & BaseException.message deprecation

Glyph Lefkowitz glyph at twistedmatrix.com
Fri Mar 11 11:51:42 EST 2011

On Mar 11, 2011, at 2:25 AM, Jason J. W. Williams wrote:

> Setting it as a class level attribute seems to suppress it:
>>>> class TestError(Exception):
> ...     message = ""
> ...
> ...     def __init__(self, msg):
> ...        self.message = msg
> Since it's a string and passed by value I think this would work. I'll
> open up a ticket if one's not already.

Sounds good.  I can't find one, but there have been other tickets with a similar purpose ('message' attributes on other exceptions).

If you have time after fixing this issue, it would be nice if you could double-check that there aren't any more of these lurking around :).

More information about the Twisted-Python mailing list