mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Changing from printf style to string formatting
This commit is contained in:
parent
f0ec9ff5b5
commit
ac2ff067d5
@ -636,7 +636,9 @@ def set_known_host(user, hostname,
|
||||
with salt.utils.fopen(full, 'a') as ofile:
|
||||
ofile.write(line)
|
||||
except (IOError, OSError) as exception:
|
||||
raise CommandExecutionError("Couldn't append to known hosts file: '%s'" % exception)
|
||||
raise CommandExecutionError(
|
||||
"Couldn't append to known hosts file: '{0}'".format(exception)
|
||||
)
|
||||
|
||||
if os.geteuid() == 0:
|
||||
os.chown(full, uinfo['uid'], uinfo['gid'])
|
||||
|
Loading…
Reference in New Issue
Block a user