GH-119169: Simplify os.walk() exception handling
#121435
Merged
os.walk() exception handling
#121435