mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 05:02: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:
parent
3fe559b88f
commit
2499c1132d
14 changed files with 148 additions and 149 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue