mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove tabs added from 677de07
This commit is contained in:
parent
5e240fec71
commit
24c4277479
1 changed files with 7 additions and 7 deletions
|
@ -1148,13 +1148,13 @@ class AnsibleModule(object):
|
|||
if self.selinux_enabled():
|
||||
self.set_context_if_different(
|
||||
tmp_dest.name, context, False)
|
||||
try:
|
||||
tmp_stat = os.stat(tmp_dest.name)
|
||||
if dest_stat and (tmp_stat.st_uid != dest_stat.st_uid or tmp_stat.st_gid != dest_stat.st_gid):
|
||||
os.chown(tmp_dest.name, dest_stat.st_uid, dest_stat.st_gid)
|
||||
except OSError, e:
|
||||
if e.errno != errno.EPERM:
|
||||
raise
|
||||
try:
|
||||
tmp_stat = os.stat(tmp_dest.name)
|
||||
if dest_stat and (tmp_stat.st_uid != dest_stat.st_uid or tmp_stat.st_gid != dest_stat.st_gid):
|
||||
os.chown(tmp_dest.name, dest_stat.st_uid, dest_stat.st_gid)
|
||||
except OSError, e:
|
||||
if e.errno != errno.EPERM:
|
||||
raise
|
||||
os.rename(tmp_dest.name, dest)
|
||||
except (shutil.Error, OSError, IOError), e:
|
||||
self.cleanup(tmp_dest.name)
|
||||
|
|
Loading…
Reference in a new issue