mirror of
https://github.com/python/cpython.git
synced 2025-07-25 12:14:38 +00:00
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
This commit is contained in:
parent
182e93c3f5
commit
c93a0ac697
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ Example::
|
||||||
|
|
||||||
for f in os.listdir(top):
|
for f in os.listdir(top):
|
||||||
pathname = os.path.join(top, f)
|
pathname = os.path.join(top, f)
|
||||||
mode = os.stat(pathname).st_mode
|
mode = os.lstat(pathname).st_mode
|
||||||
if S_ISDIR(mode):
|
if S_ISDIR(mode):
|
||||||
# It's a directory, recurse into it
|
# It's a directory, recurse into it
|
||||||
walktree(pathname, callback)
|
walktree(pathname, callback)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue