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
from .sh import ShellUtils
@@ -81,14 +82,12 @@ def crm_mon(opts=''):
81
82
prog = utils .is_program ("crm_mon" )
82
83
if not prog :
83
84
raise IOError ("crm_mon not available, check your installation" )
84
- _ , out = shell .get_stdout ("%s --help" % (prog ))
85
+ _crm_mon = [prog , '-1' ]
86
+ _ , out = shell .get_stdout ([prog , '--help' ], shell = False )
85
87
if "--pending" in out :
86
- _crm_mon = "%s -1 -j" % (prog )
87
- else :
88
- _crm_mon = "%s -1" % (prog )
88
+ _crm_mon .append ('-j' )
89
89
90
- status_cmd = "%s %s" % (_crm_mon , opts )
91
- return shell .get_stdout_stderr (utils .add_sudo (status_cmd ))
90
+ return shell .get_stdout_stderr (_crm_mon + shlex .split (opts ), shell = False )
92
91
93
92
94
93
def cmd_status (args ):
You can’t perform that action at this time.
0 commit comments