Skip to content

Commit 6c279e0

Browse files
committed
patch posixmodule umask to accept 0 as a mock setting
- this is needed by pip and venv
1 parent 1ec0d11 commit 6c279e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,10 @@ abstract static class UmaskNode extends PythonBuiltinNode {
16331633
int getAndSetUmask(int umask) {
16341634
if (umask == 0022) {
16351635
return 0022;
1636+
} if (umask == 0) {
1637+
// TODO: change me, this does not really set the umask, workaround needed for pip
1638+
// it returns the previous mask (which in our case is always 0022)
1639+
return 0022;
16361640
} else {
16371641
throw raise(NotImplementedError, "setting the umask to anything other than the default");
16381642
}

0 commit comments

Comments
 (0)