Idiotic typos in Python code
authorMark Slee <mcslee@apache.org>
Fri, 22 Jun 2007 01:03:55 +0000 (01:03 +0000)
committerMark Slee <mcslee@apache.org>
Fri, 22 Jun 2007 01:03:55 +0000 (01:03 +0000)
Summary: No clue how this slid in

Reviewed By: abosworth

Test Plan: I am stupid. TestClient.py

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665139 13f79535-47bb-0310-9956-ffa450edef68

lib/py/src/protocol/TBinaryProtocol.py

index 3c236fb..6ae0c86 100644 (file)
@@ -23,7 +23,7 @@ class TBinaryProtocol(TProtocolBase):
 
   def writeMessageBegin(self, name, type, seqid):
     if self.strictWrite:
-      self.writeI32(VERSION_1 | type)
+      self.writeI32(TBinaryProtocol.VERSION_1 | type)
       self.writeString(name)
       self.writeI32(seqid)
     else:
@@ -105,8 +105,8 @@ class TBinaryProtocol(TProtocolBase):
   def readMessageBegin(self):
     sz = self.readI32()
     if sz < 0:
-      version = sz & VERSION_MASK
-      if version != VERSION_1:
+      version = sz & TBinaryProtocol.VERSION_MASK
+      if version != TBinaryProtocol.VERSION_1:
         raise TProtocolException(TProtocolException.BAD_VERSION, 'Bad version in readMessageBegin: %d' % (sz))
       type = version & 0x000000ff
       name = self.readString()