diff options
Diffstat (limited to 'module/lib/thrift')
| -rw-r--r-- | module/lib/thrift/Thrift.py | 4 | ||||
| -rw-r--r-- | module/lib/thrift/protocol/TBinaryProtocol.py | 2 | ||||
| -rw-r--r-- | module/lib/thrift/protocol/TProtocol.py | 4 | ||||
| -rw-r--r-- | module/lib/thrift/transport/TTransport.py | 4 | ||||
| -rw-r--r-- | module/lib/thrift/transport/TTwisted.py | 2 | ||||
| -rw-r--r-- | module/lib/thrift/transport/TZlibTransport.py | 2 | 
6 files changed, 9 insertions, 9 deletions
| diff --git a/module/lib/thrift/Thrift.py b/module/lib/thrift/Thrift.py index 1d271fcff..8c270ea28 100644 --- a/module/lib/thrift/Thrift.py +++ b/module/lib/thrift/Thrift.py @@ -74,8 +74,8 @@ class TException(Exception):    """Base class for all thrift exceptions.""" -  # BaseException.message is deprecated in Python v[2.6,3.0) -  if (2,6,0) <= sys.version_info < (3,0): +  # BaseException.message is deprecated in Python v[2.6, 3.0) +  if (2, 6, 0) <= sys.version_info < (3, 0):      def _get_message(self):  	    return self._message      def _set_message(self, message): diff --git a/module/lib/thrift/protocol/TBinaryProtocol.py b/module/lib/thrift/protocol/TBinaryProtocol.py index 50c6aa896..0cc44178c 100644 --- a/module/lib/thrift/protocol/TBinaryProtocol.py +++ b/module/lib/thrift/protocol/TBinaryProtocol.py @@ -239,7 +239,7 @@ class TBinaryProtocolAccelerated(TBinaryProtocol):    our C module to do the encoding, bypassing this object entirely.    We inherit from TBinaryProtocol so that the normal TBinaryProtocol    encoding can happen if the fastbinary module doesn't work for some -  reason.  (TODO(dreiss): Make this happen sanely in more cases.) +  reason. (TODO(dreiss): Make this happen sanely in more cases.)    In order to take advantage of the C module, just use    TBinaryProtocolAccelerated instead of TBinaryProtocol. diff --git a/module/lib/thrift/protocol/TProtocol.py b/module/lib/thrift/protocol/TProtocol.py index e23774784..595ca5ae6 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 @@ -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 diff --git a/module/lib/thrift/transport/TTransport.py b/module/lib/thrift/transport/TTransport.py index 12e51a9bf..2b2e99eac 100644 --- a/module/lib/thrift/transport/TTransport.py +++ b/module/lib/thrift/transport/TTransport.py @@ -18,7 +18,7 @@  #  from cStringIO import StringIO -from struct import pack,unpack +from struct import pack, unpack  from thrift.Thrift import TException  class TTransportException(TException): @@ -127,7 +127,7 @@ class TBufferedTransportFactory:      return buffered -class TBufferedTransport(TTransportBase,CReadableTransport): +class TBufferedTransport(TTransportBase, CReadableTransport):    """Class that wraps another transport and buffers its I/O. diff --git a/module/lib/thrift/transport/TTwisted.py b/module/lib/thrift/transport/TTwisted.py index b6dcb4e0b..141e299ca 100644 --- a/module/lib/thrift/transport/TTwisted.py +++ b/module/lib/thrift/transport/TTwisted.py @@ -79,7 +79,7 @@ class ThriftClientProtocol(basic.Int32StringReceiver):          self.started.callback(self.client)      def connectionLost(self, reason=connectionDone): -        for k,v in self.client._reqs.iteritems(): +        for k, v in self.client._reqs.iteritems():              tex = TTransport.TTransportException(                  type=TTransport.TTransportException.END_OF_FILE,                  message='Connection closed') diff --git a/module/lib/thrift/transport/TZlibTransport.py b/module/lib/thrift/transport/TZlibTransport.py index 4356e4933..89fa96f61 100644 --- a/module/lib/thrift/transport/TZlibTransport.py +++ b/module/lib/thrift/transport/TZlibTransport.py @@ -125,7 +125,7 @@ class TZlibTransport(TTransportBase, CReadableTransport):    def getCompRatio(self):      ''' -    Get the current measured compression ratios (in,out) from +    Get the current measured compression ratios (in, out) from      this transport.      Returns a tuple of:  | 
