Backblaze/b2-sdk-python

Warnings on excluded files

Closed this issue · 3 comments

My exclusion regexes are working fine, but I'm getting lots of warnings like:

WARNING: /path/to/file could not be accessed (no permissions to read?)

That's probably because I ran the script without sudo and some dirs are off-limits, but if I've excluded /path/to, it shouldn't even be looking at that path, so why the warning?

Currently, exclusion happens after iteration of files, so it is indeed suboptimal.

This will likely also cause b2 CLI to return status code 1 (fail) even if inaccessible are skipped, which makes it not only annoying but a full fledged bug that has to be fixed.

This inspired me to add filtering the sys.stderr replacement I pass to SyncReport.

Thanks for the fix!