mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix traceback when generating BSD grains
This fixes a traceback introduced in e72876b
which causes grain
compilation to be incomplete. Fixes #6407.
This commit is contained in:
parent
2b53ba8172
commit
8fb2343bfa
@ -281,10 +281,9 @@ def _bsd_cpudata(osdata):
|
||||
|
||||
grains = dict([(k, __salt__['cmd.run'](v)) for k, v in cmds.items()])
|
||||
|
||||
if grains['cpu_flags'] and not isinstance(grains['cpu_flags'], list):
|
||||
if 'cpu_flags' in grains and not isinstance(grains['cpu_flags'], list):
|
||||
grains['cpu_flags'] = grains['cpu_flags'].split(' ')
|
||||
|
||||
|
||||
if osdata['kernel'] == 'NetBSD':
|
||||
grains['cpu_flags'] = []
|
||||
for line in __salt__['cmd.run']('cpuctl identify 0').splitlines():
|
||||
|
Loading…
Reference in New Issue
Block a user