-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesttime est: 1 hourWe estimate this issue will take 1 hour to completeWe estimate this issue will take 1 hour to complete
Description
What?
Currently, if the directory_files_read function is unable to read one file in a directory, it raises an exception and does so in a way that is difficult to handle.
For example, let's say there are four files in a directory and the directory_files_read reads the first two correctly but fails with a UnicodeDecodeError on the third:
for path, contents in directory_files_read(directory_path, recursive=False):
...There is no good way I'm aware of to handle this failure in a way that would let you skip the error and move on.
How?
I believe the best solution is to add error handling into this function.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttime est: 1 hourWe estimate this issue will take 1 hour to completeWe estimate this issue will take 1 hour to complete