Skip to content

Commit c93a0ac

Browse files
authored
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
1 parent 182e93c commit c93a0ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/stat.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Example::
109109

110110
for f in os.listdir(top):
111111
pathname = os.path.join(top, f)
112-
mode = os.stat(pathname).st_mode
112+
mode = os.lstat(pathname).st_mode
113113
if S_ISDIR(mode):
114114
# It's a directory, recurse into it
115115
walktree(pathname, callback)

0 commit comments

Comments
 (0)