Fix for type error introduced by #51034 (#54333)

* Fix for type error

The empty type here should be a dict, not a list as is has a `get` done
on it next.

* Return dict directly to avoid failing key lookup
pull/54353/head
Matt Williams 6 years ago committed by Martin Krizek
parent 8768c05d3e
commit e02524dd58

@ -175,7 +175,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
url = "%s/api/v2/hosts/%s" % (self.foreman_url, hid)
ret = self._get_json(url, [404])
if not ret or not isinstance(ret, MutableMapping) or not ret.get('all_parameters', False):
ret = []
return {}
return ret.get('all_parameters')
def _get_facts_by_id(self, hid):

Loading…
Cancel
Save