1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Return the octal mode of a file instead of decimal.

This commit is contained in:
Jeroen Hoekx 2012-04-26 14:55:31 +02:00
parent 7773a62291
commit 3594d1ce80

View file

@ -58,7 +58,7 @@ def add_path_info(kwargs):
kwargs['user'] = user kwargs['user'] = user
kwargs['group'] = group kwargs['group'] = group
st = os.stat(path) st = os.stat(path)
kwargs['mode'] = stat.S_IMODE(st[stat.ST_MODE]) kwargs['mode'] = oct(stat.S_IMODE(st[stat.ST_MODE]))
# secontext not yet supported # secontext not yet supported
if os.path.islink(path): if os.path.islink(path):
kwargs['state'] = 'link' kwargs['state'] = 'link'