Reordering ret statement

This commit is contained in:
Nitin Madhok 2014-09-24 16:54:48 -04:00
parent 03e3da4181
commit efe987be41

View File

@ -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))