From 007d3c1671289d164f487b35aced33c1b10df4da Mon Sep 17 00:00:00 2001 From: dev-adi-github-nuitka <145064571+dev-adi-github-nuitka@users.noreply.github.com> Date: Thu, 30 Jan 2025 09:34:14 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20made=20ansible=5Ffacts=20propert?= =?UTF-8?q?y's=20type=20consistent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- towerlib/entities/host.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/towerlib/entities/host.py b/towerlib/entities/host.py index 685094a..ad75791 100644 --- a/towerlib/entities/host.py +++ b/towerlib/entities/host.py @@ -34,7 +34,8 @@ import logging from towerlib.towerlibexceptions import InvalidGroup, InvalidValue -from .core import Entity, EntityManager, validate_max_length, validate_json + +from .core import Entity, EntityManager, validate_json, validate_max_length __author__ = '''Costas Tyfoxylos ''' __docformat__ = '''google''' @@ -310,7 +311,7 @@ def ansible_facts(self): response = self._tower.session.get(url) if not response.ok: self._logger.error('Error finding ansible facts for %s.', self._data.get('name')) - return response.json() if response.ok else '{}' + return response.json() if response.ok else {} def associate_with_groups(self, groups): """Associate the host with the provided groups.