mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #10593 from bcoca/backup_ioerror
capture IOErrors on backup_local (happens on non posix filesystems)
This commit is contained in:
commit
02b03cfdf5
1 changed files with 1 additions and 1 deletions
|
@ -1303,7 +1303,7 @@ class AnsibleModule(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
shutil.copy2(fn, backupdest)
|
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))
|
self.fail_json(msg='Could not make backup of %s to %s: %s' % (fn, backupdest, e))
|
||||||
return backupdest
|
return backupdest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue