diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-16 17:12:41 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-16 17:12:41 +0200 |
commit | 1fdd59172b321fbebf34dc2f9d1b85ad449d42f7 (patch) | |
tree | 78895b14d1d3f9dfbb3de4a7f443c581e68d6cdb | |
parent | Plugins cleanup (diff) | |
download | pyload-1fdd59172b321fbebf34dc2f9d1b85ad449d42f7.tar.xz |
Fix lib import
-rw-r--r-- | docs/build_docs.py | 4 | ||||
-rw-r--r-- | pyload/__init__.py | 2 | ||||
-rw-r--r-- | pyload/remote/socketbackend/create_ttypes.py | 5 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/ThriftClient.py | 12 |
4 files changed, 4 insertions, 19 deletions
diff --git a/docs/build_docs.py b/docs/build_docs.py index 82dd75e0b..15fc2070d 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -21,10 +21,6 @@ dir_name = os.path.join(os.path.dirname(os.path.abspath(""))) sys.path.append(dir_name) -if "64" in platform.machine(): - sys.path.append(os.path.join(os.path.dirname, "lib64")) -sys.path.append(os.path.join(os.path.dirname, "lib", "Python", "Lib")) - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/pyload/__init__.py b/pyload/__init__.py index 1ca7c4fdc..7f5ac0667 100644 --- a/pyload/__init__.py +++ b/pyload/__init__.py @@ -55,6 +55,8 @@ __builtin__.pypath = os.path.abspath(os.path.join(rootdir, "..")) if "64" in platform.machine(): sys.path.append(os.path.join(pypath, "lib64")) sys.path.append(os.path.join(pypath, "lib", "Python", "Lib")) +sys.path.append(os.path.join(pypath, "lib")) + sys.stdout = getwriter(get_console_encoding(sys.stdout.encoding))(sys.stdout, errors="replace") diff --git a/pyload/remote/socketbackend/create_ttypes.py b/pyload/remote/socketbackend/create_ttypes.py index 8c03b8576..72bc4c231 100644 --- a/pyload/remote/socketbackend/create_ttypes.py +++ b/pyload/remote/socketbackend/create_ttypes.py @@ -5,11 +5,6 @@ import os import platform import sys - -if "64" in platform.machine(): - sys.path.append(os.path.join(pypath, "lib64")) -sys.path.append(os.path.join(pypath, "lib", "Python", "Lib")) - sys.path.append(os.path.join(pypath, "pyload", "remote")) from pyload.remote.thriftbackend.thriftgen.pyload import ttypes diff --git a/pyload/remote/thriftbackend/ThriftClient.py b/pyload/remote/thriftbackend/ThriftClient.py index c779c9b9c..289762adc 100644 --- a/pyload/remote/thriftbackend/ThriftClient.py +++ b/pyload/remote/thriftbackend/ThriftClient.py @@ -1,19 +1,11 @@ # -*- coding: utf-8 -*- import sys +import thrift + from socket import error from traceback import print_exc -try: - import thrift - -except ImportError: - import platform - - if "64" in platform.machine(): - sys.path.append(os.path.join(pypath, "lib64")) - sys.path.append(os.path.join(pypath, "lib", "Python", "Lib")) - from thrift.transport import TTransport #from thrift.transport.TZlibTransport import TZlibTransport from Socket import Socket |