summaryrefslogtreecommitdiffstats
path: root/module/lib/thrift/protocol/TBinaryProtocol.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-06-28 16:12:44 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-06-28 20:23:59 +0200
commit2c797aba90ec32fa979dce8c89789309f936ddce (patch)
treefd08def9e9e9cd9892e8b5743fa91be4ad45b26c /module/lib/thrift/protocol/TBinaryProtocol.py
parent[Lib] Update simplejson to version 3.5.3 (diff)
downloadpyload-2c797aba90ec32fa979dce8c89789309f936ddce.tar.xz
[Lib] Update thrift to version 0.9.1
Diffstat (limited to 'module/lib/thrift/protocol/TBinaryProtocol.py')
-rw-r--r--module/lib/thrift/protocol/TBinaryProtocol.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/lib/thrift/protocol/TBinaryProtocol.py b/module/lib/thrift/protocol/TBinaryProtocol.py
index 50c6aa896..6fdd08c26 100644
--- a/module/lib/thrift/protocol/TBinaryProtocol.py
+++ b/module/lib/thrift/protocol/TBinaryProtocol.py
@@ -20,8 +20,8 @@
from TProtocol import *
from struct import pack, unpack
-class TBinaryProtocol(TProtocolBase):
+class TBinaryProtocol(TProtocolBase):
"""Binary implementation of the Thrift protocol driver."""
# NastyHaxx. Python 2.4+ on 32-bit machines forces hex constants to be
@@ -68,7 +68,7 @@ class TBinaryProtocol(TProtocolBase):
pass
def writeFieldStop(self):
- self.writeByte(TType.STOP);
+ self.writeByte(TType.STOP)
def writeMapBegin(self, ktype, vtype, size):
self.writeByte(ktype)
@@ -127,13 +127,16 @@ class TBinaryProtocol(TProtocolBase):
if sz < 0:
version = sz & TBinaryProtocol.VERSION_MASK
if version != TBinaryProtocol.VERSION_1:
- raise TProtocolException(type=TProtocolException.BAD_VERSION, message='Bad version in readMessageBegin: %d' % (sz))
+ raise TProtocolException(
+ type=TProtocolException.BAD_VERSION,
+ message='Bad version in readMessageBegin: %d' % (sz))
type = sz & TBinaryProtocol.TYPE_MASK
name = self.readString()
seqid = self.readI32()
else:
if self.strictRead:
- raise TProtocolException(type=TProtocolException.BAD_VERSION, message='No protocol version header')
+ raise TProtocolException(type=TProtocolException.BAD_VERSION,
+ message='No protocol version header')
name = self.trans.readAll(sz)
type = self.readByte()
seqid = self.readI32()
@@ -231,7 +234,6 @@ class TBinaryProtocolFactory:
class TBinaryProtocolAccelerated(TBinaryProtocol):
-
"""C-Accelerated version of TBinaryProtocol.
This class does not override any of TBinaryProtocol's methods,
@@ -250,7 +252,6 @@ class TBinaryProtocolAccelerated(TBinaryProtocol):
Please feel free to report bugs and/or success stories
to the public mailing list.
"""
-
pass