# HG changeset patch # User Pierre-Yves David # Date 1329228909 -3600 # Node ID 9b9180969892db137d4dd884c7572213d76949ec # Parent 8c29253105baec06562899554bae51651ce25338 [c-c] use subprocess instead of os.system to start repository diff -r 8c29253105ba -r 9b9180969892 server/serverctl.py --- 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