Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bb7aa9

Browse files
committed
Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8b in posix_access().
1 parent 93648f0 commit 5bb7aa9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ posix_access(PyObject *self, PyObject *args, PyObject *kwargs)
24302430
*/
24312431
return_value = PyBool_FromLong(
24322432
(attr != 0xFFFFFFFF) &&
2433-
((mode & 2) ||
2433+
(!(mode & 2) ||
24342434
!(attr & FILE_ATTRIBUTE_READONLY) ||
24352435
(attr & FILE_ATTRIBUTE_DIRECTORY)));
24362436
#else

0 commit comments

Comments
 (0)