Merge pull request #369 from bcoca/known_hosts_oserrors

now also captrure OSErrors on temp file creation
reviewable/pr18780/r1
Brian Coca 11 years ago
commit dc0cfbd1b4

@ -137,7 +137,7 @@ def enforce_state(module, params):
outf.write(key) outf.write(key)
outf.close() outf.close()
module.atomic_move(outf.name,path) module.atomic_move(outf.name,path)
except IOError,e: except (IOError,OSError),e:
module.fail_json(msg="Failed to write to file %s: %s" % \ module.fail_json(msg="Failed to write to file %s: %s" % \
(path,str(e))) (path,str(e)))
params['changed'] = True params['changed'] = True

Loading…
Cancel
Save