diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-08-08 18:04:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 18:04:02 (GMT) |
commit | 2b496e79293a8b80e8ba0e514e186b3b1467b64b (patch) | |
tree | 0d6f597a7a38fdd2df3857e230ac2b5062f39581 /Lib | |
parent | 0eec6276fdcdde5221370d92b50ea95851760c72 (diff) | |
download | cpython-2b496e79293a8b80e8ba0e514e186b3b1467b64b.zip cpython-2b496e79293a8b80e8ba0e514e186b3b1467b64b.tar.gz cpython-2b496e79293a8b80e8ba0e514e186b3b1467b64b.tar.bz2 |
bpo-42053: Remove misleading check in os.fwalk() (GH-27669)
os.fwalk() does not support integer as the first argument,
and never supported.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/os.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -461,8 +461,7 @@ if {open, stat} <= supports_dir_fd and {scandir, stat} <= supports_fd: dirs.remove('CVS') # don't visit CVS directories """ 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 # lstat()/open()/fstat() trick. if not follow_symlinks: |