Issue #22 resolved

Annoying BaseException.message deprecation warning in Python 2.6

Travis Jensen
created an issue

This is just an annoyance, but it bugs anyway. Here is a patch:

{{{

!python

iff -r 23ebc37c78e8 piston/oauth.py --- a/piston/oauth.py Thu Apr 30 11:06:19 2009 +0200 +++ b/piston/oauth.py Sat May 02 20:41:42 2009 -0600 @@ -12,6 +12,10 @@

# Generic exception class class OAuthError(RuntimeError): + def _get_message(self): return self._message + def _set_message(self, message): self._message = message + message = property(_get_message, _set_message) + def init(self, message='OAuth error occured.'): self.message = message }}} ===========================

The idea for the fix comes from http://www.mail-archive.com/python-dev@python.org/msg23565.html

Comments (5)

  1. Log in to comment