diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-04-02 21:19:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-02 21:19:48 (GMT) |
commit | 23c0200c436714a3f9b38d5e6cac230ceacd4c43 (patch) | |
tree | 70e2f62e3a05886e905bcb951ee1e0a030eb6841 | |
parent | 319a70cf99c9866c7fa47deecf04f6ebcfe35a54 (diff) | |
download | cpython-23c0200c436714a3f9b38d5e6cac230ceacd4c43.zip cpython-23c0200c436714a3f9b38d5e6cac230ceacd4c43.tar.gz cpython-23c0200c436714a3f9b38d5e6cac230ceacd4c43.tar.bz2 |
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
(cherry picked from commit c93a0ac6972221787d8bea1c41a9feb667ed3d2c)
Co-authored-by: 180909 <wjh180909@gmail.com>
-rw-r--r-- | Doc/library/stat.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst index 98219ea..083dc5e 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) |