mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Reordering ret statement
This commit is contained in:
parent
03e3da4181
commit
efe987be41
@ -3527,9 +3527,9 @@ def copy(name, source, force=False, makedirs=False):
|
||||
source_user = __salt__['file.get_user'](source)
|
||||
source_group = __salt__['file.get_group'](source)
|
||||
source_mode = __salt__['file.get_mode'](source)
|
||||
__salt__['file.check_perms'](name, ret, source_user, source_group, source_mode)
|
||||
ret['comment'] = 'Copied "{0}" to "{1}"'.format(source, name)
|
||||
ret['changes'] = {name: source}
|
||||
__salt__['file.check_perms'](name, ret, source_user, source_group, source_mode)
|
||||
except (IOError, OSError):
|
||||
return _error(
|
||||
ret, 'Failed to copy "{0}" to "{1}"'.format(source, name))
|
||||
|
Loading…
Reference in New Issue
Block a user