summaryrefslogtreecommitdiffstats
path: root/pyload/remote/thriftbackend
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote/thriftbackend')
-rw-r--r--pyload/remote/thriftbackend/ThriftClient.py8
-rw-r--r--pyload/remote/thriftbackend/ThriftTest.py9
2 files changed, 12 insertions, 5 deletions
diff --git a/pyload/remote/thriftbackend/ThriftClient.py b/pyload/remote/thriftbackend/ThriftClient.py
index d5159320e..7c2a1cb01 100644
--- a/pyload/remote/thriftbackend/ThriftClient.py
+++ b/pyload/remote/thriftbackend/ThriftClient.py
@@ -2,13 +2,17 @@
import sys
from socket import error
-from os.path import dirname, abspath, join
from traceback import print_exc
try:
import thrift
+
except ImportError:
- sys.path.append(abspath(join(dirname(abspath(__file__)), "..", "..", "lib")))
+ import platform
+
+ if "64" in platform.machine():
+ sys.path.append(os.path.join(pypath, "lib64"))
+ sys.path.append(os.path.join(pypath, "lib"))
from thrift.transport import TTransport
#from thrift.transport.TZlibTransport import TZlibTransport
diff --git a/pyload/remote/thriftbackend/ThriftTest.py b/pyload/remote/thriftbackend/ThriftTest.py
index 05c6ba40e..c9c0d3cf3 100644
--- a/pyload/remote/thriftbackend/ThriftTest.py
+++ b/pyload/remote/thriftbackend/ThriftTest.py
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
+import os
+import platform
import sys
-from os.path import join, abspath, dirname
-path = join((abspath(dirname(__file__))), "..", "..", "lib")
-sys.path.append(path)
+if "64" in platform.machine():
+ sys.path.append(os.path.join(pypath, "lib64"))
+sys.path.append(os.path.join(pypath, "lib"))
+
from pyload.remote.thriftbackend.thriftgen.pyload import Pyload
from pyload.remote.thriftbackend.thriftgen.pyload.ttypes import *