Fix for type error

The empty type here should be a dict, not a list as is has a `get` done
on it next.
pull/54333/head
Matt Williams 6 years ago
parent cfd869e898
commit e94e80c79e

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

Loading…
Cancel
Save