Kaydet (Commit) e63bbe7f authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

Split argument string right

üst 82a79ea4
...@@ -21,6 +21,7 @@ import pwd ...@@ -21,6 +21,7 @@ import pwd
import grp import grp
import signal import signal
import time import time
import shlex
from comar.utility import * from comar.utility import *
...@@ -232,7 +233,7 @@ def startService(command, args=None, pidfile=None, makepid=False, nice=None, det ...@@ -232,7 +233,7 @@ def startService(command, args=None, pidfile=None, makepid=False, nice=None, det
cmd = [ command ] cmd = [ command ]
if args: if args:
if isinstance(args, basestring): if isinstance(args, basestring):
args = args.split() args = shlex.split(args)
cmd.extend(args) cmd.extend(args)
try: try:
...@@ -316,7 +317,7 @@ def stopService(pidfile=None, command=None, args=None, chuid=None, user=None, na ...@@ -316,7 +317,7 @@ def stopService(pidfile=None, command=None, args=None, chuid=None, user=None, na
cmd = [ command ] cmd = [ command ]
if args: if args:
if isinstance(args, basestring): if isinstance(args, basestring):
args = args.split() args = shlex.split(args)
cmd.extend(args) cmd.extend(args)
if chuid: if chuid:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment