1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix exception upon display.warn() (#31876)

Fixes #31875
This commit is contained in:
Jerry Chong 2017-10-18 19:04:59 +08:00 committed by Martin Krizek
parent a7df2322e4
commit 567e989581

View file

@ -133,7 +133,7 @@ class InventoryModule(BaseFileInventoryPlugin):
hosts, port = self._parse_host(host_pattern)
self.populate_host_vars(hosts, group_data['hosts'][host_pattern] or {}, group, port)
else:
self.display.warn('Skipping unexpected key (%s) in group (%s), only "vars", "children" and "hosts" are valid' % (key, group))
self.display.warning('Skipping unexpected key (%s) in group (%s), only "vars", "children" and "hosts" are valid' % (key, group))
def _parse_host(self, host_pattern):
'''