now also captrure OSErrors on temp file fixes #360
This commit is contained in:
parent
c9f90a2402
commit
fd060d453c
1 changed files with 2 additions and 2 deletions
|
@ -137,11 +137,11 @@ def enforce_state(module, params):
|
|||
outf.write(key)
|
||||
outf.close()
|
||||
module.atomic_move(outf.name,path)
|
||||
except IOError,e:
|
||||
except (IOError,OSError),e:
|
||||
module.fail_json(msg="Failed to write to file %s: %s" % \
|
||||
(path,str(e)))
|
||||
params['changed'] = True
|
||||
|
||||
|
||||
return params
|
||||
|
||||
def sanity_check(module,host,key,sshkeygen):
|
||||
|
|
Loading…
Reference in a new issue