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
This commit is contained in:
Matt Williams 2019-03-25 15:29:29 +00:00 committed by Martin Krizek
parent 8768c05d3e
commit e02524dd58

View file

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