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

now stat skips md5 if file isn't readable

This commit is contained in:
Brian Coca 2014-03-11 22:50:05 -04:00
parent 6da2c37112
commit 463a1c21ea

View file

@ -132,9 +132,10 @@ def main():
if S_ISLNK(mode):
d['lnk_source'] = os.path.realpath(path)
if S_ISREG(mode) and get_md5:
if S_ISREG(mode) and get_md5 and os.access(path,os.R_OK):
d['md5'] = module.md5(path)
try:
pw = pwd.getpwuid(st.st_uid)