From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 2 Apr 2022 21:21:45 +0000 (-0700) Subject: bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845) X-Git-Tag: v3.9.13~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc9322a91d48c80afe8329bb509673a2f74fb925;p=thirdparty%2FPython%2Fcpython.git bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845) (cherry picked from commit c93a0ac6972221787d8bea1c41a9feb667ed3d2c) Co-authored-by: 180909 --- diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst index 98219eaee976..083dc5e3bcfd 100644 --- a/Doc/library/stat.rst +++ b/Doc/library/stat.rst @@ -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)