# only try workarounds for errno 18 (cross device), 1 (not permitted), 13 (permission denied)
# and 26 (text file busy) which happens on vagrant synced folders and other 'exotic' non posix file systems
self.fail_json(msg='Could not replace file: %s to %s: %s'%(src,dest,e))
self.fail_json(msg='Could not replace file: %s to %s: %s'%(src,dest,e), exception=traceback.format_exc())
else:
b_dest_dir=os.path.dirname(b_dest)
# Use bytes here. In the shippable CI, this fails with
@ -2075,7 +2075,7 @@ class AnsibleModule(object):
# would end in something like:
# file = _os.path.join(dir, pre + name + suf)
# TypeError: can't concat bytes to str
self.fail_json(msg='Failed creating temp file for atomic move. This usually happens when using Python3 less than Python3.5. Please use Python2.x or Python3.5 or greater.',exception=sys.exc_info())
self.fail_json(msg='Failed creating temp file for atomic move. This usually happens when using Python3 less than Python3.5. Please use Python2.x or Python3.5 or greater.',exception=traceback.format_exc())