mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove list2cmdline
This commit is contained in:
parent
c258cb3f73
commit
837c32e673
1 changed files with 3 additions and 6 deletions
|
@ -82,11 +82,8 @@ def cpuload():
|
|||
'''
|
||||
|
||||
# Pull in the information from WMIC
|
||||
cmd = list2cmdline(['wmic', 'cpu', 'get', 'loadpercentage', '/value'])
|
||||
info = __salt__['cmd.run'](cmd).split('=')
|
||||
|
||||
# Return pull it out of the informatin and cast it to an int
|
||||
return int(info[1])
|
||||
cmd = ['wmic', 'cpu', 'get', 'loadpercentage', '/value']
|
||||
return int(__salt__['cmd.run'](cmd).split('=')[1])
|
||||
|
||||
|
||||
def diskusage(human_readable=False, path=None):
|
||||
|
@ -210,7 +207,7 @@ def uptime(human_readable=False):
|
|||
'''
|
||||
|
||||
# Open up a subprocess to get information from WMIC
|
||||
cmd = list2cmdline(['wmic', 'os', 'get', 'lastbootuptime', '/value'])
|
||||
cmd = ['wmic', 'os', 'get', 'lastbootuptime', '/value']
|
||||
startup_time = __salt__['cmd.run'](cmd).split('=')[1][:14]
|
||||
|
||||
# Convert to time struct
|
||||
|
|
Loading…
Add table
Reference in a new issue