Skip to content

Commit 233ef24

Browse files
asottileserhiy-storchaka
authored andcommitted
bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797)
1 parent 02a0a19 commit 233ef24

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Raise ``NotImplementedError`` instead of ``SystemError`` on platforms where
2+
``chmod(..., follow_symlinks=False)`` is not supported. Patch by Anthony
3+
Sottile.

Modules/posixmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,7 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
28272827
dir_fd, follow_symlinks);
28282828
else
28292829
follow_symlinks_specified("chmod", follow_symlinks);
2830+
return NULL;
28302831
}
28312832
else
28322833
#endif

0 commit comments

Comments
 (0)