bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797)

This commit is contained in:
Anthony Sottile 2017-12-14 08:57:55 -08:00 committed by Serhiy Storchaka
parent 02a0a19206
commit 233ef249cc
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Raise ``NotImplementedError`` instead of ``SystemError`` on platforms where
``chmod(..., follow_symlinks=False)`` is not supported. Patch by Anthony
Sottile.

View File

@ -2827,6 +2827,7 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
dir_fd, follow_symlinks); dir_fd, follow_symlinks);
else else
follow_symlinks_specified("chmod", follow_symlinks); follow_symlinks_specified("chmod", follow_symlinks);
return NULL;
} }
else else
#endif #endif