for root, dirs, files in os.walk(p, onerror = on_walk_error):
for filename in files:
full_path = os.path.join(root, filename)
st = os.lstat(full_path)
if not stat.S_ISDIR(st.st_mode):
for root, dirs, files in os.walk(p, onerror = on_walk_error):
for filename in files:
full_path = os.path.join(root, filename)
st = os.lstat(full_path)
if not stat.S_ISDIR(st.st_mode):