summaryrefslogtreecommitdiffstats
path: root/pyload/remote/thriftbackend/Protocol.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
commite00ef98491f79ae8aa972ae1473dae4a7b78c07e (patch)
tree31be0c7cdcebb61525bcc387bcf15d265a1c494a /pyload/remote/thriftbackend/Protocol.py
parentFix except (diff)
downloadpyload-e00ef98491f79ae8aa972ae1473dae4a7b78c07e.tar.xz
Cleanup
Diffstat (limited to 'pyload/remote/thriftbackend/Protocol.py')
-rw-r--r--pyload/remote/thriftbackend/Protocol.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyload/remote/thriftbackend/Protocol.py b/pyload/remote/thriftbackend/Protocol.py
index 417b45834..c020e7a23 100644
--- a/pyload/remote/thriftbackend/Protocol.py
+++ b/pyload/remote/thriftbackend/Protocol.py
@@ -3,6 +3,7 @@
from thrift.protocol import TBinaryProtocol
class Protocol(TBinaryProtocol.TBinaryProtocol):
+
def writeString(self, str):
try:
str = str.encode("utf8", "ignore")
@@ -12,6 +13,7 @@ class Protocol(TBinaryProtocol.TBinaryProtocol):
self.writeI32(len(str))
self.trans.write(str)
+
def readString(self):
len = self.readI32()
str = self.trans.readAll(len)