thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axiong <nickfa...@gmail.com>
Subject fix DeprecationWarning for thrift running with python 2.6
Date Tue, 11 Aug 2009 07:28:32 GMT
i worte some exception definition in my thrift idl file ,when i run my app
server code(in python 2.6) it cause some DeprecationWarning:

/usr/local/lib/python2.6/dist-packages/thrift/Thrift.py:61:
DeprecationWarning: BaseException.message has been deprecated as of Python
2.6
  self.message = message

to ignore this,i modify the thrift/Thrift.py add some code in class
TException definition after line 54:

  def _get_message(self, message): return self._message
  def _set_message(self, message): self._message = message
  message = property(_get_message, _set_message)

it maybe helpful for someone who used thrift with python 2.6

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message