mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Insure num_cpus grains is an int on BSD systems, for consistency with Linux.
This commit is contained in:
parent
de41270818
commit
c4524819e4
@ -124,6 +124,10 @@ def _bsd_cpudata(osdata):
|
||||
|
||||
grains = dict([(k, __salt__['cmd.run'](v)) for k, v in cmds.items()])
|
||||
grains['cpu_flags'] = []
|
||||
try:
|
||||
grains['num_cpus'] = int(grains['num_cpus'])
|
||||
except Exception:
|
||||
grains['num_cpus'] = 0
|
||||
|
||||
return grains
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user