now stat skips md5 if file isn't readable

pull/6421/head
Brian Coca 10 years ago
parent 6da2c37112
commit 463a1c21ea

@ -132,8 +132,9 @@ def main():
if S_ISLNK(mode):
d['lnk_source'] = os.path.realpath(path)
if S_ISREG(mode) and get_md5:
d['md5'] = module.md5(path)
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)

Loading…
Cancel
Save