Skip to content

Commit a2f9436

Browse files
committed
use PyObjectLookupAttr instead of PyObjectGetAttr since we ignore the exception here anyway
1 parent 03f937c commit a2f9436

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/AbstractImportNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ static abstract class PyModuleIsInitializing extends Node {
334334
@Specialization
335335
static boolean isInitializing(VirtualFrame frame, Object mod,
336336
@Cached PyObjectGetAttr getSpecNode,
337-
@Cached PyObjectGetAttr getInitNode,
337+
@Cached PyObjectLookupAttr getInitNode,
338+
// CPython uses PyObject_GetAttr, but ignores the exception here
338339
@Cached PyObjectIsTrueNode isTrue) {
339340
try {
340341
Object spec = getSpecNode.execute(frame, mod, SpecialAttributeNames.__SPEC__);

0 commit comments

Comments
 (0)