diff options
author | 2014-06-28 15:53:29 +0200 | |
---|---|---|
committer | 2014-06-28 20:23:43 +0200 | |
commit | b8942672378fccc7d557dfc2e40a4d90aecf7a0d (patch) | |
tree | 1d4a4cd78988b0ac3c18fcad8e4f3791b11f3f27 /module/lib/thrift/protocol/TProtocol.py | |
parent | [Lib] Update bottle.py to version 0.12.7 (diff) | |
download | pyload-b8942672378fccc7d557dfc2e40a4d90aecf7a0d.tar.xz |
[Lib] Revert libraries to original status (remove all cosmetics optimizations)
Diffstat (limited to 'module/lib/thrift/protocol/TProtocol.py')
-rw-r--r-- | module/lib/thrift/protocol/TProtocol.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/lib/thrift/protocol/TProtocol.py b/module/lib/thrift/protocol/TProtocol.py index 595ca5ae6..7338ff68a 100644 --- a/module/lib/thrift/protocol/TProtocol.py +++ b/module/lib/thrift/protocol/TProtocol.py @@ -202,7 +202,7 @@ class TProtocolBase: # tuple of: ( 'reader method' name, is_container boolean, 'writer_method' name ) _TTYPE_HANDLERS = ( - (None, None, False), # 0 == TType, STOP + (None, None, False), # 0 == TType,STOP (None, None, False), # 1 == TType.VOID # TODO: handle void? ('readBool', 'writeBool', False), # 2 == TType.BOOL ('readByte', 'writeByte', False), # 3 == TType.BYTE and I08 @@ -279,7 +279,7 @@ class TProtocolBase: obj = obj_class() obj.read(self) return obj - + def readContainerMap(self, spec): results = dict() key_ttype, key_spec = spec[0], spec[1] @@ -298,7 +298,7 @@ class TProtocolBase: v_val = val_reader() else: v_val = self.readFieldByTType(val_ttype, val_spec) - # this raises a TypeError with unhashable keys types. i.e. d=dict(); d[[0, 1]] = 2 fails + # this raises a TypeError with unhashable keys types. i.e. d=dict(); d[[0,1]] = 2 fails results[k_val] = v_val self.readMapEnd() return results @@ -401,3 +401,4 @@ class TProtocolBase: class TProtocolFactory: def getProtocol(self, trans): pass + |