summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/AccountManager.py4
-rw-r--r--module/PluginManager.py10
-rw-r--r--module/api/DownloadPreparingApi.py2
-rw-r--r--module/common/__init__.py0
-rw-r--r--module/config/ConfigManager.py3
-rw-r--r--module/plugins/Crypter.py2
-rw-r--r--module/threads/InfoThread.py2
-rw-r--r--module/utils/ImportDebugger.py (renamed from module/common/ImportDebugger.py)0
-rw-r--r--module/utils/JsEngine.py (renamed from module/common/JsEngine.py)0
-rw-r--r--module/utils/json_layer.py (renamed from module/common/json_layer.py)2
-rw-r--r--module/utils/packagetools.py (renamed from module/common/packagetools.py)0
-rw-r--r--module/utils/pylgettext.py (renamed from module/common/pylgettext.py)0
-rw-r--r--module/web/webinterface.py4
-rwxr-xr-xpyload.py4
14 files changed, 16 insertions, 17 deletions
diff --git a/module/AccountManager.py b/module/AccountManager.py
index 6e2786d55..5cdcfb57a 100644
--- a/module/AccountManager.py
+++ b/module/AccountManager.py
@@ -19,9 +19,7 @@
from threading import Lock
from random import choice
-from module.common.json_layer import json
-from module.utils import lock
-
+from module.utils import lock, json
class AccountManager:
"""manages all accounts"""
diff --git a/module/PluginManager.py b/module/PluginManager.py
index ea4b7cdb3..bb1c76bf3 100644
--- a/module/PluginManager.py
+++ b/module/PluginManager.py
@@ -40,7 +40,7 @@ PluginTuple = namedtuple("PluginTuple", "version re deps category user path")
class PluginManager:
ROOT = "module.plugins."
- USERROOT = "userplugins."
+ LOCALROOT = "localplugins."
TYPES = ("crypter", "hoster", "accounts", "addons", "internal")
BUILTIN = re.compile(r'__(?P<attr>[a-z0-9_]+)__\s*=\s?(True|False|None|[0-9x.]+)', re.I)
@@ -313,8 +313,8 @@ class PluginManager:
def find_module(self, fullname, path=None):
#redirecting imports if necesarry
- if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): #separate pyload plugins
- if fullname.startswith(self.USERROOT): user = 1
+ if fullname.startswith(self.ROOT) or fullname.startswith(self.LOCALROOT): #separate pyload plugins
+ if fullname.startswith(self.LOCALROOT): user = 1
else: user = 0 #used as bool and int
split = fullname.split(".")
@@ -333,9 +333,9 @@ class PluginManager:
if name not in sys.modules: #could be already in modules
if replace:
if self.ROOT in name:
- newname = name.replace(self.ROOT, self.USERROOT)
+ newname = name.replace(self.ROOT, self.LOCALROOT)
else:
- newname = name.replace(self.USERROOT, self.ROOT)
+ newname = name.replace(self.LOCALROOT, self.ROOT)
else: newname = name
base, plugin = newname.rsplit(".", 1)
diff --git a/module/api/DownloadPreparingApi.py b/module/api/DownloadPreparingApi.py
index 4fc5b1ff9..edd5d362c 100644
--- a/module/api/DownloadPreparingApi.py
+++ b/module/api/DownloadPreparingApi.py
@@ -5,8 +5,8 @@ from itertools import chain
from module.Api import Api, RequirePerm, Permission, OnlineCheck, LinkStatus, urlmatcher
from module.utils.fs import join
+from module.utils.packagetools import parseNames
from module.network.RequestFactory import getURL
-from module.common.packagetools import parseNames
from ApiComponent import ApiComponent
diff --git a/module/common/__init__.py b/module/common/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/module/common/__init__.py
+++ /dev/null
diff --git a/module/config/ConfigManager.py b/module/config/ConfigManager.py
index b1cb05d53..85088020b 100644
--- a/module/config/ConfigManager.py
+++ b/module/config/ConfigManager.py
@@ -4,8 +4,7 @@
from new_collections import OrderedDict
from module.Api import InvalidConfigSection
-from module.common.json_layer import json
-from module.utils import from_string, primary_uid
+from module.utils import from_string, primary_uid, json
from ConfigParser import ConfigParser
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py
index 61370541f..c665888ad 100644
--- a/module/plugins/Crypter.py
+++ b/module/plugins/Crypter.py
@@ -2,9 +2,9 @@
from traceback import print_exc
-from module.common.packagetools import parseNames
from module.utils import to_list, has_method, uniqify
from module.utils.fs import exists, remove, fs_encode
+from module.utils.packagetools import parseNames
from Base import Base, Retry
diff --git a/module/threads/InfoThread.py b/module/threads/InfoThread.py
index a8a2c6e7e..bf5bb5777 100644
--- a/module/threads/InfoThread.py
+++ b/module/threads/InfoThread.py
@@ -5,7 +5,7 @@ from time import time
from traceback import print_exc
from module.Api import LinkStatus
-from module.common.packagetools import parseNames
+from module.utils.packagetools import parseNames
from module.utils import has_method, accumulate
from BaseThread import BaseThread
diff --git a/module/common/ImportDebugger.py b/module/utils/ImportDebugger.py
index a997f7b0c..a997f7b0c 100644
--- a/module/common/ImportDebugger.py
+++ b/module/utils/ImportDebugger.py
diff --git a/module/common/JsEngine.py b/module/utils/JsEngine.py
index ef7494d16..ef7494d16 100644
--- a/module/common/JsEngine.py
+++ b/module/utils/JsEngine.py
diff --git a/module/common/json_layer.py b/module/utils/json_layer.py
index 4d57a9f38..cf9743603 100644
--- a/module/common/json_layer.py
+++ b/module/utils/json_layer.py
@@ -3,6 +3,8 @@
# abstraction layer for json operations
+print ".json_layer is deprecated, use .json instead"
+
try: # since python 2.6
import json
from json import loads as json_loads
diff --git a/module/common/packagetools.py b/module/utils/packagetools.py
index 791a46d51..791a46d51 100644
--- a/module/common/packagetools.py
+++ b/module/utils/packagetools.py
diff --git a/module/common/pylgettext.py b/module/utils/pylgettext.py
index fb36fecee..fb36fecee 100644
--- a/module/common/pylgettext.py
+++ b/module/utils/pylgettext.py
diff --git a/module/web/webinterface.py b/module/web/webinterface.py
index f18157cd7..2a9b5660b 100644
--- a/module/web/webinterface.py
+++ b/module/web/webinterface.py
@@ -18,7 +18,7 @@
"""
import sys
-import module.common.pylgettext as gettext
+import module.utils.pylgettext as gettext
import os
from os.path import join, abspath, dirname, exists
@@ -53,7 +53,7 @@ else:
PYLOAD = ServerThread.core.api
config = ServerThread.core.config
-from module.common.JsEngine import JsEngine
+from module.utils.JsEngine import JsEngine
JS = JsEngine()
diff --git a/pyload.py b/pyload.py
index 594b57838..b1b76d6af 100755
--- a/pyload.py
+++ b/pyload.py
@@ -47,10 +47,10 @@ from module.interaction.EventManager import EventManager
from module.network.RequestFactory import RequestFactory
from module.web.ServerThread import WebServer
from module.Scheduler import Scheduler
-from module.common.JsEngine import JsEngine
from module.remote.RemoteManager import RemoteManager
+from module.utils.JsEngine import JsEngine
-import module.common.pylgettext as gettext
+import module.utils.pylgettext as gettext
from module.utils import formatSize, get_console_encoding
from module.utils.fs import free_space, exists, makedirs, join, chmod