diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
commit | 2b353fa266c13b77b2c77af797dc28c8380b9443 (patch) | |
tree | db1e1b9f67cf87ffb711f91c643d665bae1bee8a /module/remote/thriftbackend/ThriftTest.py | |
parent | thrift + setup fixes (diff) | |
download | pyload-2b353fa266c13b77b2c77af797dc28c8380b9443.tar.xz |
more fixes
Diffstat (limited to 'module/remote/thriftbackend/ThriftTest.py')
-rw-r--r-- | module/remote/thriftbackend/ThriftTest.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/remote/thriftbackend/ThriftTest.py b/module/remote/thriftbackend/ThriftTest.py index 9bbb8cbb9..7fe790cd9 100644 --- a/module/remote/thriftbackend/ThriftTest.py +++ b/module/remote/thriftbackend/ThriftTest.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- import sys from os.path import join,abspath,dirname @@ -12,7 +13,8 @@ from thriftgen.pyload.ttypes import * from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol + +from Protocol import Protocol from time import sleep, time @@ -52,7 +54,7 @@ try: transport = TTransport.TBufferedTransport(transport) # Wrap in a protocol - protocol = TBinaryProtocol.TBinaryProtocol(transport) + protocol = Protocol(transport) # Create a client to use the protocol encoder client = Pyload.Client(protocol) @@ -75,7 +77,9 @@ try: q = client.getQueue() for p in q: - print client.getPackageData(p.pid) + data = client.getPackageData(p.pid) + print data + print "Package Name: ", data.name # Close! transport.close() |