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:
Erik Johnson 2013-07-29 16:09:00 -05:00
parent 2b53ba8172
commit 8fb2343bfa

View File

@ -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():