diff options
author | Cserna Zsolt <cserna.zsolt@gmail.com> | 2020-10-28 08:27:43 +0100 |
---|---|---|
committer | Cserna Zsolt <cserna.zsolt@gmail.com> | 2020-10-31 17:40:56 +0100 |
commit | 8a38e7a6e8039de93c6f24935effd89f034d9c00 (patch) | |
tree | 3b49c5cf8a25e3f445a55b34344e081ac690144b /AUTHORS | |
parent | b95991aeeab28be6af94e24668414360e4d3a630 (diff) | |
download | pytest-8a38e7a6e8039de93c6f24935effd89f034d9c00.tar.gz |
Fix handling recursive symlinks
When pytest was run on a directory containing a recursive symlink it failed
with ELOOP as the library was not able to determine the type of the
direntry:
src/_pytest/main.py:685: in collect
if not direntry.is_file():
E OSError: [Errno 40] Too many levels of symbolic links: '/home/florian/proj/pytest/tests/recursive'
This is fixed by handling ELOOP and other errors in the visit function in
pathlib.py, so the entries whose is_file() call raises an OSError with the
pre-defined list of error numbers will be exluded from the result.
The _ignore_errors function was copied from Lib/pathlib.py of cpython 3.9.
Fixes #7951
Diffstat (limited to 'AUTHORS')
-rw-r--r-- | AUTHORS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -314,3 +314,4 @@ Xuecong Liao Yoav Caspi Zac Hatfield-Dodds Zoltán Máté +Zsolt Cserna |