diff options
| author | 2014-11-16 00:25:42 +0100 | |
|---|---|---|
| committer | 2014-11-16 00:25:42 +0100 | |
| commit | 0076ef8fa124410e1406d23022c471dba2065c58 (patch) | |
| tree | cb68c0985814bf3c50cd0f731b6764ad38f5d802 /pyload | |
| parent | [PluginManager] Improve getPlugin (diff) | |
| download | pyload-0076ef8fa124410e1406d23022c471dba2065c58.tar.xz | |
Move socketbackend.ttypes to api.types
Diffstat (limited to 'pyload')
| -rw-r--r-- | pyload/api/__init__.py | 4 | ||||
| -rw-r--r-- | pyload/api/types.py (renamed from pyload/remote/socketbackend/ttypes.py) | 2 | ||||
| -rw-r--r-- | pyload/remote/socketbackend/create_ttypes.py | 9 | 
3 files changed, 6 insertions, 9 deletions
| diff --git a/pyload/api/__init__.py b/pyload/api/__init__.py index 017a9a939..e7e082ecd 100644 --- a/pyload/api/__init__.py +++ b/pyload/api/__init__.py @@ -36,9 +36,9 @@ if activated:          BaseObject = TBase      except ImportError:          print "Thrift not imported" -        from remote.socketbackend.ttypes import * +        from pyload.api.types import *  else: -    from remote.socketbackend.ttypes import * +    from pyload.api.types import *  # contains function names mapped to their permissions  # unlisted functions are for admins only diff --git a/pyload/remote/socketbackend/ttypes.py b/pyload/api/types.py index 3fd02fac8..7f7c35dfc 100644 --- a/pyload/remote/socketbackend/ttypes.py +++ b/pyload/api/types.py @@ -163,7 +163,7 @@ class OnlineCheck(BaseObject):  class OnlineStatus(BaseObject):  	__slots__ = ['name', 'plugin', 'packagename', 'status', 'size'] -	def __init__(self, name=None, plugin=None, packagename=None, status=None, size=None): +	def __init__(self, name=None, plugin=(None, None), packagename=None, status=None, size=None):  		self.name = name  		self.plugin = plugin  		self.packagename = packagename diff --git a/pyload/remote/socketbackend/create_ttypes.py b/pyload/remote/socketbackend/create_ttypes.py index 64398c3e7..4563f9711 100644 --- a/pyload/remote/socketbackend/create_ttypes.py +++ b/pyload/remote/socketbackend/create_ttypes.py @@ -4,11 +4,8 @@ import inspect  import sys  from os.path import abspath, dirname, join -path = dirname(abspath(__file__)) -module = join(path, "..", "..") - -sys.path.append(join(module, "lib")) -sys.path.append(join(module, "remote")) +sys.path.append(join(pypath, "pyload", "lib")) +sys.path.append(join(pypath, "pyload", "remote"))  from thriftbackend.thriftgen.pyload import ttypes  from thriftbackend.thriftgen.pyload.Pyload import Iface @@ -33,7 +30,7 @@ def main():              enums.append(klass) -    f = open(join(path, "ttypes.py"), "wb") +    f = open(join(pypath, "pyload", "api", "types.py"), "wb")      f.write(          """# -*- coding: utf-8 -*- | 
