mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed py3 compatibility
This commit is contained in:
parent
70ac47ae61
commit
89c57666c3
1 changed files with 3 additions and 2 deletions
|
@ -1722,7 +1722,8 @@ class AnsibleModule(object):
|
|||
out_dest.close()
|
||||
if in_src:
|
||||
in_src.close()
|
||||
except (shutil.Error, OSError, IOError), e:
|
||||
except (shutil.Error, OSError, IOError):
|
||||
e = get_exception()
|
||||
self.fail_json(msg='Could not write data to file (%s) from (%s): %s' % (dest, src, e))
|
||||
elif e.errno not in [errno.EPERM, errno.EXDEV, errno.EACCES, errno.ETXTBSY]:
|
||||
# only try workarounds for errno 18 (cross device), 1 (not permitted), 13 (permission denied)
|
||||
|
|
Loading…
Reference in a new issue