diff options
author | 2015-05-12 16:29:22 +0200 | |
---|---|---|
committer | 2015-05-12 16:29:22 +0200 | |
commit | 18a808617f60c30e7ed817d79050f5564d289eb0 (patch) | |
tree | 04d1f0d6657dd951d2665da2330e54ebe0bd6665 /pyload/remote/thriftbackend/ThriftTest.py | |
parent | Missing optional lib (diff) | |
download | pyload-18a808617f60c30e7ed817d79050f5564d289eb0.tar.xz |
Other import fixes (3)
Diffstat (limited to 'pyload/remote/thriftbackend/ThriftTest.py')
-rw-r--r-- | pyload/remote/thriftbackend/ThriftTest.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pyload/remote/thriftbackend/ThriftTest.py b/pyload/remote/thriftbackend/ThriftTest.py index 3ea67682b..b3d351c0b 100644 --- a/pyload/remote/thriftbackend/ThriftTest.py +++ b/pyload/remote/thriftbackend/ThriftTest.py @@ -7,14 +7,12 @@ import sys import time import xmlrpclib +import thrift + +from pyload.remote.thriftbackend.Protocol import Protocol +from pyload.remote.thriftbackend.Socket import Socket from pyload.remote.thriftbackend.thriftgen.pyload import Pyload from pyload.remote.thriftbackend.thriftgen.pyload.ttypes import * -from Socket import Socket - -from thrift import Thrift -from thrift.transport import TTransport - -from Protocol import Protocol def bench(f, *args, **kwargs): @@ -51,7 +49,7 @@ try: transport = Socket('localhost', 7228, False) # Buffering is critical. Raw sockets are very slow - transport = TTransport.TBufferedTransport(transport) + transport = thrift.transport.TTransport.TBufferedTransport(transport) # Wrap in a protocol protocol = Protocol(transport) @@ -84,5 +82,5 @@ try: # Close! transport.close() -except Thrift.TException, tx: +except thrift.Thrift.TException, tx: print 'ThriftExpection: %s' % tx.message |