From 247ae6fbec98dbc42c3910df2942842ef5256715 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 15 Jan 2012 21:17:23 +0100 Subject: fix test cases --- pyLoadCore.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pyLoadCore.py') 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 -- cgit v1.2.3