summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/ThriftTest.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/thriftbackend/ThriftTest.py')
-rw-r--r--module/remote/thriftbackend/ThriftTest.py10
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()