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:
|
try:
|
||||||
os.mkdir('/root/.ssh', 0o700)
|
os.mkdir('/root/.ssh', 0o700)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == 17: # File Exists
|
if e.errno != 17: # not File Exists
|
||||||
pass
|
raise
|
||||||
raise
|
|
||||||
finish_files(files_to_write, args)
|
finish_files(files_to_write, args)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue