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:
parent
bea0c3733a
commit
d6bf4f566f
@ -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)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user