Skip to content

Commit

Permalink
Merge branch 'ccrouzet/fix-ast-module-check' into 'main'
Browse files Browse the repository at this point in the history
Fix the Check Against Python's AST Module

See merge request omniverse/warp!603
  • Loading branch information
christophercrouzet committed Jul 3, 2024
2 parents 6f0ff2b + 08eb8b6 commit 571bab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion warp/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ def eval(adj, node):
emit_node = adj.node_visitors[type(node)]
except KeyError as e:
type_name = type(node).__name__
namespace = "ast." if getattr(type(node), "__module__", None) == "ast" else ""
namespace = "ast." if isinstance(node, ast.AST) else ""
raise WarpCodegenError(f"Construct `{namespace}{type_name}` not supported in kernels.") from e

return emit_node(adj, node)
Expand Down

0 comments on commit 571bab6

Please sign in to comment.