Merge pull request #10593 from bcoca/backup_ioerror

capture IOErrors on backup_local (happens on non posix filesystems)
This commit is contained in:
Brian Coca 2015-04-02 15:55:20 -04:00
commit 02b03cfdf5

View file

@ -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