From 686d92ce66c100e8fc9671ea8a021aca21adc5cf Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Thu, 2 Sep 2010 00:36:18 +0000 Subject: [PATCH] THRIFT-824. py: TApplicationException.__str__() refers to class constants as globals Refer to constants via 'self'. Patch: Peter Schuller git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991781 13f79535-47bb-0310-9956-ffa450edef68 --- lib/py/src/Thrift.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/py/src/Thrift.py b/lib/py/src/Thrift.py index 5f2564de..91728a77 100644 --- a/lib/py/src/Thrift.py +++ b/lib/py/src/Thrift.py @@ -85,15 +85,15 @@ class TApplicationException(TException): def __str__(self): if self.message: return self.message - elif self.type == UNKNOWN_METHOD: + elif self.type == self.UNKNOWN_METHOD: return 'Unknown method' - elif self.type == INVALID_MESSAGE_TYPE: + elif self.type == self.INVALID_MESSAGE_TYPE: return 'Invalid message type' - elif self.type == WRONG_METHOD_NAME: + elif self.type == self.WRONG_METHOD_NAME: return 'Wrong method name' - elif self.type == BAD_SEQUENCE_ID: + elif self.type == self.BAD_SEQUENCE_ID: return 'Bad sequence ID' - elif self.type == MISSING_RESULT: + elif self.type == self.MISSING_RESULT: return 'Missing result' else: return 'Default (unknown) TApplicationException' -- 2.17.1