now stat skips md5 if file isn't readable

reviewable/pr18780/r1
Brian Coca 11 years ago
parent 21c4378ad5
commit 3b98ed15bc

@ -132,9 +132,10 @@ def main():
if S_ISLNK(mode): if S_ISLNK(mode):
d['lnk_source'] = os.path.realpath(path) 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) d['md5'] = module.md5(path)
try: try:
pw = pwd.getpwuid(st.st_uid) pw = pwd.getpwuid(st.st_uid)

Loading…
Cancel
Save