From 18a808617f60c30e7ed817d79050f5564d289eb0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 16:29:22 +0200 Subject: Other import fixes (3) --- pyload/remote/thriftbackend/ThriftTest.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pyload/remote/thriftbackend/ThriftTest.py') 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 -- cgit v1.2.3