]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not crash when failing to read an entry (#1090)
authorTzu-ping Chung <uranusjr@gmail.com>
Thu, 24 Oct 2019 21:19:13 +0000 (05:19 +0800)
committerJelle Zijlstra <jelle.zijlstra@gmail.com>
Thu, 24 Oct 2019 21:19:13 +0000 (14:19 -0700)
black.py

index 24ab6607f7bf61b22b8e325ed6e94a2e71bcaf48..ada9b0efe1b989500cb05c1959440eca7be0f8e4 100644 (file)
--- a/black.py
+++ b/black.py
@@ -3491,6 +3491,9 @@ def gen_python_files_in_dir(
         # Then ignore with `exclude` option.
         try:
             normalized_path = "/" + child.resolve().relative_to(root).as_posix()
         # Then ignore with `exclude` option.
         try:
             normalized_path = "/" + child.resolve().relative_to(root).as_posix()
+        except OSError as e:
+            report.path_ignored(child, f"cannot be read because {e}")
+            continue
         except ValueError:
             if child.is_symlink():
                 report.path_ignored(
         except ValueError:
             if child.is_symlink():
                 report.path_ignored(