mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue