now also captrure OSErrors on temp file fixes #360

pull/18777/head
Brian Coca 10 years ago committed by Matt Clay
parent c9f90a2402
commit fd060d453c

@ -137,7 +137,7 @@ 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

Loading…
Cancel
Save