bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)

(cherry picked from commit c93a0ac697)

Co-authored-by: 180909 <wjh180909@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-04-02 14:19:48 -07:00 committed by GitHub
parent 319a70cf99
commit 23c0200c43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,7 @@ Example::
for f in os.listdir(top):
pathname = os.path.join(top, f)
mode = os.stat(pathname).st_mode
mode = os.lstat(pathname).st_mode
if S_ISDIR(mode):
# It's a directory, recurse into it
walktree(pathname, callback)