]> granicus.if.org Git - python/commitdiff
bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (#4797)
authorAnthony Sottile <asottile@umich.edu>
Thu, 14 Dec 2017 16:57:55 +0000 (08:57 -0800)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 14 Dec 2017 16:57:55 +0000 (18:57 +0200)
Misc/NEWS.d/next/Library/2017-12-11-09-53-14.bpo-32277.jkKiVC.rst [new file with mode: 0644]
Modules/posixmodule.c

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 (file)
index 0000000..765527a
--- /dev/null
@@ -0,0 +1,3 @@
+Raise ``NotImplementedError`` instead of ``SystemError`` on platforms where
+``chmod(..., follow_symlinks=False)`` is not supported.  Patch by Anthony
+Sottile.
index de32327b30402ac23cbc93dd4f769125903c00c4..fb879e3821aa683afd1de6e61ef75dafb16f84a8 100644 (file)
@@ -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