1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-25 13:12:46 +00:00

[PR #9323/1d8f0b29 backport][stable-10] inventory plugins: use f-strings (#9332)

inventory plugins: use f-strings (#9323)

* inventory plugins: use f-strings

* add changelog frag

(cherry picked from commit 1d8f0b2942)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-23 12:25:16 +01:00 committed by GitHub
parent 3fe559b88f
commit 2499c1132d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 148 additions and 149 deletions

View file

@ -124,7 +124,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
# Create groups based on variable values and add the corresponding hosts to it
self._add_host_to_keyed_groups(self.get_option('keyed_groups'), host_attrs, host, strict=strict)
except Exception as e:
raise AnsibleParserError('Unable to fetch hosts from GitLab API, this was the original exception: %s' % to_native(e))
raise AnsibleParserError(f'Unable to fetch hosts from GitLab API, this was the original exception: {to_native(e)}')
def verify_file(self, path):
"""Return the possibly of a file being consumable by this plugin."""