Thanks to visit codestin.com
Credit goes to github.com

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/stat.rst

Lines changed: 1 addition & 1 deletion
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)