For cases where a symlink exists and is pointing to a file which does not exist, an error is thrown when you attempt to open that file because while the path you gave was valid, the file itself cannot be opened by the system. This changes the behaviour so instead of throwing an error, an empty hex digest is returned instead.
I can't think of another case where os.walk will give you a path back that does not exist, so I'm not too concerned about this breaking other behaviour unintentionally.
For cases where a symlink exists and is pointing to a file which does not exist, an error is thrown when you attempt to open that file because while the path you gave was valid, the file itself cannot be opened by the system. This changes the behaviour so instead of throwing an error, an empty hex digest is returned instead.
I can't think of another case where
os.walk
will give you a path back that does not exist, so I'm not too concerned about this breaking other behaviour unintentionally.