summaryrefslogtreecommitdiffstats
path: root/pyload/remote
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
commitacc46fc3497a66a427b795b4a22c6e71d69185a1 (patch)
tree2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/remote
parentCode fixes (diff)
downloadpyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz
Update
Diffstat (limited to 'pyload/remote')
-rw-r--r--pyload/remote/ClickAndLoadBackend.py2
-rw-r--r--pyload/remote/SocketBackend.py2
-rw-r--r--pyload/remote/ThriftBackend.py2
-rw-r--r--pyload/remote/socketbackend/create_ttypes.py13
-rw-r--r--pyload/remote/thriftbackend/ThriftClient.py8
-rw-r--r--pyload/remote/thriftbackend/ThriftTest.py9
6 files changed, 24 insertions, 12 deletions
diff --git a/pyload/remote/ClickAndLoadBackend.py b/pyload/remote/ClickAndLoadBackend.py
index 8c7906997..a73ea7f24 100644
--- a/pyload/remote/ClickAndLoadBackend.py
+++ b/pyload/remote/ClickAndLoadBackend.py
@@ -13,7 +13,7 @@ try:
except Exception:
pass
-from pyload.manager.RemoteManager import BackendBase
+from pyload.manager.Remote import BackendBase
core = None
js = None
diff --git a/pyload/remote/SocketBackend.py b/pyload/remote/SocketBackend.py
index c85e59f42..a1c885347 100644
--- a/pyload/remote/SocketBackend.py
+++ b/pyload/remote/SocketBackend.py
@@ -2,7 +2,7 @@
import SocketServer
-from pyload.manager.RemoteManager import BackendBase
+from pyload.manager.Remote import BackendBase
class RequestHandler(SocketServer.BaseRequestHandler):
diff --git a/pyload/remote/ThriftBackend.py b/pyload/remote/ThriftBackend.py
index 2b46e25c0..16917cfc9 100644
--- a/pyload/remote/ThriftBackend.py
+++ b/pyload/remote/ThriftBackend.py
@@ -3,7 +3,7 @@
from os.path import exists
-from pyload.manager.RemoteManager import BackendBase
+from pyload.manager.Remote import BackendBase
from pyload.remote.thriftbackend.Processor import Processor
from pyload.remote.thriftbackend.Protocol import ProtocolFactory
diff --git a/pyload/remote/socketbackend/create_ttypes.py b/pyload/remote/socketbackend/create_ttypes.py
index cf357bd53..5bfbcafa0 100644
--- a/pyload/remote/socketbackend/create_ttypes.py
+++ b/pyload/remote/socketbackend/create_ttypes.py
@@ -1,11 +1,16 @@
# -*- coding: utf-8 -*-
import inspect
+import os
+import platform
import sys
-from os.path import abspath, dirname, join
-sys.path.append(join(pypath, "pyload", "lib"))
-sys.path.append(join(pypath, "pyload", "remote"))
+
+if "64" in platform.machine():
+ sys.path.append(os.path.join(pypath, "lib64"))
+sys.path.append(os.path.join(pypath, "lib"))
+
+sys.path.append(os.path.join(pypath, "pyload", "remote"))
from pyload.remote.thriftbackend.thriftgen.pyload import ttypes
from pyload.remote.thriftbackend.thriftgen.pyload.Pyload import Iface
@@ -30,7 +35,7 @@ def main():
enums.append(klass)
- f = open(join(pypath, "pyload", "api", "types.py"), "wb")
+ f = open(os.path.join(pypath, "pyload", "api", "types.py"), "wb")
f.write(
"""# -*- coding: utf-8 -*-
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 *