From 59d4efda817f73eb195f47ff9f04cb0f4ec47525 Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Mon, 21 Mar 2011 17:38:22 +0000 Subject: THRIFT-1094. py: bug in TCompactProto python readMessageEnd method and updated test cases This patch fixes a TCompactProtocol bug and expands the test cases to exercise the problem. Patch: Will Pierce git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083877 13f79535-47bb-0310-9956-ffa450edef68 --- lib/py/src/protocol/TCompactProtocol.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/py/src') diff --git a/lib/py/src/protocol/TCompactProtocol.py b/lib/py/src/protocol/TCompactProtocol.py index 7ff07987a..280b54f0f 100644 --- a/lib/py/src/protocol/TCompactProtocol.py +++ b/lib/py/src/protocol/TCompactProtocol.py @@ -291,9 +291,8 @@ class TCompactProtocol(TProtocolBase): return (name, type, seqid) def readMessageEnd(self): - assert self.state == VALUE_READ + assert self.state == CLEAR assert len(self.__structs) == 0 - self.state = CLEAR def readStructBegin(self): assert self.state in (CLEAR, CONTAINER_READ, VALUE_READ), self.state -- cgit v1.2.1