thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axiong <>
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:

DeprecationWarning: BaseException.message has been deprecated as of Python
  self.message = message

to ignore this,i modify the thrift/ 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

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