Fix FileExists exception handling for .ssh

We intended to ignore this exception because it isnt an error case.

Change-Id: I83b7d8053ca660a114e904962456799bfe737b53
This commit is contained in:
Gregory Haynes 2015-09-03 18:55:57 -07:00
parent bea0c3733a
commit d6bf4f566f
1 changed files with 2 additions and 3 deletions

View File

@ -349,9 +349,8 @@ def write_ssh_keys(args):
try:
os.mkdir('/root/.ssh', 0o700)
except OSError as e:
if e.errno == 17: # File Exists
pass
raise
if e.errno != 17: # not File Exists
raise
finish_files(files_to_write, args)