mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Get rid of global variable
This commit is contained in:
parent
488f6716d4
commit
c379b7e4ed
1 changed files with 7 additions and 3 deletions
|
@ -327,7 +327,11 @@ def _dmidecoder(args=None):
|
|||
'''
|
||||
Call DMIdecode
|
||||
'''
|
||||
if args is None:
|
||||
return salt.modules.cmdmod._run_quiet(DMIDECODER)
|
||||
dmidecoder = salt.utils.path.which_bin(['dmidecode', 'smbios'])
|
||||
|
||||
if not args:
|
||||
out = salt.modules.cmdmod._run_quiet(dmidecoder)
|
||||
else:
|
||||
return salt.modules.cmdmod._run_quiet('{0} {1}'.format(DMIDECODER, args))
|
||||
out = salt.modules.cmdmod._run_quiet('{0} {1}'.format(dmidecoder, args))
|
||||
|
||||
return out
|
||||
|
|
Loading…
Add table
Reference in a new issue