Skip to content

Commit 1e0be28

Browse files
committed
Add resource.error
1 parent 060374b commit 1e0be28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -126,6 +126,9 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
126126
@Override
127127
public void initialize(Python3Core core) {
128128
super.initialize(core);
129+
130+
addBuiltinConstant("error", PythonBuiltinClassType.OSError);
131+
129132
addBuiltinConstant("RUSAGE_CHILDREN", RUSAGE_CHILDREN);
130133
addBuiltinConstant("RUSAGE_SELF", RUSAGE_SELF);
131134
addBuiltinConstant("RUSAGE_THREAD", RUSAGE_THREAD);

0 commit comments

Comments
 (0)