Skip to content

Commit 23fbf0f

Browse files
steve-stimfel
authored andcommitted
HPy: fix test_hpycontextvar
1 parent 15ea67f commit 23fbf0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContextFunctions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3743,10 +3743,10 @@ int execute(Object[] arguments,
37433743
}
37443744
Object result = ((PContextVar) var).getValue();
37453745
if (result == null) {
3746-
if (def instanceof PNone) {
3746+
if (def == NULL_HANDLE_DELEGATE) {
37473747
def = ((PContextVar) var).getDefault();
37483748
if (def == PContextVar.NO_DEFAULT) {
3749-
throw raiseNode.raise(PythonBuiltinClassType.LookupError);
3749+
def = NULL_HANDLE_DELEGATE;
37503750
}
37513751
}
37523752
result = def;

0 commit comments

Comments
 (0)