From 0e3b4572f9bc460741fe5cd3108b22fad89bfc71 Mon Sep 17 00:00:00 2001 From: brent s Date: Thu, 4 May 2017 13:48:53 -0400 Subject: [PATCH] oops. --- script-samples/post/second.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script-samples/post/second.py b/script-samples/post/second.py index fdfbf40..f44f7b4 100644 --- a/script-samples/post/second.py +++ b/script-samples/post/second.py @@ -12,9 +12,9 @@ os.makedirs(keydir, exist_ok = True) os.chown(keydir, 0, 0) os.chmod(keydir, 0o700) -with open('{0}/authorized_keys', 'w') as f: +with open('{0}/authorized_keys'.format(keydir), 'w') as f: with urlopen(keyfile) as url: f.write(url.read().decode('utf-8')) -os.chown('{0}/authorized_keys', 0, 0) -os.chmod('{0}/authorized_keys', 0o600) +os.chown('{0}/authorized_keys'.format(keydir), 0, 0) +os.chmod('{0}/authorized_keys'.format(keydir), 0o600)