mirror of
https://github.com/python/cpython.git
synced 2025-10-07 23:51:16 +00:00
bpo-42053: Remove misleading check in os.fwalk() (GH-27669)
os.fwalk() does not support integer as the first argument, and never supported.
This commit is contained in:
parent
0eec6276fd
commit
2b496e7929
1 changed files with 1 additions and 2 deletions
|
@ -461,7 +461,6 @@ if {open, stat} <= supports_dir_fd and {scandir, stat} <= supports_fd:
|
||||||
dirs.remove('CVS') # don't visit CVS directories
|
dirs.remove('CVS') # don't visit CVS directories
|
||||||
"""
|
"""
|
||||||
sys.audit("os.fwalk", top, topdown, onerror, follow_symlinks, dir_fd)
|
sys.audit("os.fwalk", top, topdown, onerror, follow_symlinks, dir_fd)
|
||||||
if not isinstance(top, int) or not hasattr(top, '__index__'):
|
|
||||||
top = fspath(top)
|
top = fspath(top)
|
||||||
# Note: To guard against symlink races, we use the standard
|
# Note: To guard against symlink races, we use the standard
|
||||||
# lstat()/open()/fstat() trick.
|
# lstat()/open()/fstat() trick.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue