diff options
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 6 | ||||
-rwxr-xr-x | pyLoadCore.py | 10 | ||||
-rw-r--r-- | tests/test_api.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 7b204b90d..0e9595265 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,12 +1,10 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from urlparse import urlparse -from re import search -from urllib import unquote from module.network.HTTPRequest import BadHeader from module.plugins.Hoster import Hoster -from module.utils import html_unescape, remove_chars +from module.utils import html_unescape class BasePlugin(Hoster): __name__ = "BasePlugin" @@ -63,4 +61,4 @@ class BasePlugin(Hoster): def downloadFile(self, pyfile): pyfile.name = html_unescape(urlparse(pyfile.url).path.split("/")[-1]) - self.download(pyfile.url, disposition=True)
\ No newline at end of file + self.download(pyfile.url, disposition=True) diff --git a/pyLoadCore.py b/pyLoadCore.py index cfb2c38d0..e79da3fc3 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -273,7 +273,7 @@ class Core(object): self.version = CURRENT_VERSION - if not exists("pyload.conf"): + if not exists("pyload.conf") and not tests: from module.setup import Setup print "This is your first start, running configuration assistent now." @@ -312,7 +312,8 @@ class Core(object): self.remote &= self.config['remote']['activated'] pid = self.isAlreadyRunning() - if pid: + # dont exit when in test runner + if pid and not tests: print _("pyLoad already running with pid %s") % pid exit() @@ -350,8 +351,9 @@ class Core(object): self.log.info(_("Starting") + " pyLoad %s" % CURRENT_VERSION) self.log.info(_("Using home directory: %s") % getcwd()) - - self.writePidFile() + + if not tests: + self.writePidFile() #@TODO refractor diff --git a/tests/test_api.py b/tests/test_api.py index 236f72882..0171b46bb 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -15,4 +15,4 @@ class TestApi(TestCase): api = APIExerciser(self.core) for i in range(2000): - api.testAPI()
\ No newline at end of file + api.testAPI() |