Commit 27765883 by Brian Coca

capture IOErrors on backup_local (happens on non posix filesystems)

fixes #10591
parent 97a4483c
......@@ -1303,7 +1303,7 @@ class AnsibleModule(object):
try:
shutil.copy2(fn, backupdest)
except shutil.Error, e:
except (shutil.Error, IOError), e:
self.fail_json(msg='Could not make backup of %s to %s: %s' % (fn, backupdest, e))
return backupdest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment