From: Anthony Sottile Date: Thu, 14 Dec 2017 16:57:55 +0000 (-0800) Subject: bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797) X-Git-Tag: v3.7.0a4~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=233ef249cc5c18d796fb581747179c5e062b4083;p=python bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797) --- diff --git a/Misc/NEWS.d/next/Library/2017-12-11-09-53-14.bpo-32277.jkKiVC.rst b/Misc/NEWS.d/next/Library/2017-12-11-09-53-14.bpo-32277.jkKiVC.rst new file mode 100644 index 0000000000..765527a655 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-12-11-09-53-14.bpo-32277.jkKiVC.rst @@ -0,0 +1,3 @@ +Raise ``NotImplementedError`` instead of ``SystemError`` on platforms where +``chmod(..., follow_symlinks=False)`` is not supported. Patch by Anthony +Sottile. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index de32327b30..fb879e3821 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2827,6 +2827,7 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd, dir_fd, follow_symlinks); else follow_symlinks_specified("chmod", follow_symlinks); + return NULL; } else #endif