File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com>
2
2
# Copyright (C) 2008-2011 Dejan Muhamedagic <dmuhamedagic@suse.de>
3
3
# See COPYING for license information.
4
-
5
4
import re
5
+ import shlex
6
+
6
7
from . import clidisplay
7
8
from . import utils
8
9
@@ -79,14 +80,12 @@ def crm_mon(opts=''):
79
80
prog = utils .is_program ("crm_mon" )
80
81
if not prog :
81
82
raise IOError ("crm_mon not available, check your installation" )
82
- _ , out = utils .get_stdout ("%s --help" % (prog ))
83
+ _crm_mon = [prog , '-1' ]
84
+ _ , out = utils .get_stdout ([prog , '--help' ], shell = False )
83
85
if "--pending" in out :
84
- _crm_mon = "%s -1 -j" % (prog )
85
- else :
86
- _crm_mon = "%s -1" % (prog )
86
+ _crm_mon .append ('-j' )
87
87
88
- status_cmd = "%s %s" % (_crm_mon , opts )
89
- return utils .get_stdout (utils .add_sudo (status_cmd ))
88
+ return utils .get_stdout (_crm_mon + shlex .split (opts ), shell = False )
90
89
91
90
92
91
def cmd_status (args ):
You can’t perform that action at this time.
0 commit comments