mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
connection plugins: use f-strings (#9322)
* connection plugins: use f-strings * add changelog frag
This commit is contained in:
parent
c3ed2144e2
commit
d539b00d4c
11 changed files with 105 additions and 99 deletions
|
@ -55,11 +55,12 @@ class Connection(Jail):
|
|||
|
||||
jail_uuid = self.get_jail_uuid()
|
||||
|
||||
kwargs[Jail.modified_jailname_key] = 'ioc-{0}'.format(jail_uuid)
|
||||
kwargs[Jail.modified_jailname_key] = f'ioc-{jail_uuid}'
|
||||
|
||||
display.vvv(u"Jail {iocjail} has been translated to {rawjail}".format(
|
||||
iocjail=self.ioc_jail, rawjail=kwargs[Jail.modified_jailname_key]),
|
||||
host=kwargs[Jail.modified_jailname_key])
|
||||
display.vvv(
|
||||
f"Jail {self.ioc_jail} has been translated to {kwargs[Jail.modified_jailname_key]}",
|
||||
host=kwargs[Jail.modified_jailname_key]
|
||||
)
|
||||
|
||||
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
|
||||
|
||||
|
@ -81,6 +82,6 @@ class Connection(Jail):
|
|||
p.wait()
|
||||
|
||||
if p.returncode != 0:
|
||||
raise AnsibleError(u"iocage returned an error: {0}".format(stdout))
|
||||
raise AnsibleError(f"iocage returned an error: {stdout}")
|
||||
|
||||
return stdout.strip('\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue