]> granicus.if.org Git - python/commitdiff
bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 14 Dec 2017 17:30:45 +0000 (09:30 -0800)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 14 Dec 2017 17:30:45 +0000 (19:30 +0200)
(cherry picked from commit 233ef249cc5c18d796fb581747179c5e062b4083)

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 ee27fa4dec6f4e9be7487e9170958827b4a5c23a..821b64ccbca0d15382a00a97e214a980ed41c556 100644 (file)
@@ -2790,6 +2790,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