capture IOErrors on backup_local (happens on non posix filesystems)
fixes #10591
This commit is contained in:
parent
b1ccb5989c
commit
1fa3dbb7d2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue