Changing from printf style to string formatting

This commit is contained in:
Joseph Hall 2013-06-25 08:33:16 -06:00
parent f0ec9ff5b5
commit ac2ff067d5

View File

@ -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'])