server/serverctl.py
branchstable
changeset 8233 9b9180969892
parent 7815 2a164a9cf81c
child 8350 e1c05bf6fdeb
--- a/server/serverctl.py	Tue Feb 14 15:14:40 2012 +0100
+++ b/server/serverctl.py	Tue Feb 14 15:15:09 2012 +0100
@@ -25,6 +25,7 @@
 import sys
 import os
 import logging
+import subprocess
 
 from logilab.common import nullobject
 from logilab.common.configuration import Configuration
@@ -258,12 +259,13 @@
     cfgname = 'repository'
 
     def start_server(self, config):
-        command = ['cubicweb-ctl start-repository ']
+        command = ['cubicweb-ctl', 'start-repository']
         if config.debugmode:
             command.append('--debug')
-        command.append('--loglevel %s' % config['log-threshold'].lower())
+        command.append('--loglevel')
+        command.append(config['log-threshold'].lower())
         command.append(config.appid)
-        os.system(' '.join(command))
+        subprocess.call(command)
         return 1