Unverified Commit abd8e77a authored by Frank Lee's avatar Frank Lee Committed by GitHub
Browse files

[extension] fixed exception catch (#5342)

parent 71321a07
...@@ -126,7 +126,7 @@ class _CppExtension(_Extension): ...@@ -126,7 +126,7 @@ class _CppExtension(_Extension):
def load(self): def load(self):
try: try:
op_kernel = self.import_op() op_kernel = self.import_op()
except ImportError: except (ImportError, ModuleNotFoundError):
# if import error occurs, it means that the kernel is not pre-built # if import error occurs, it means that the kernel is not pre-built
# so we build it jit # so we build it jit
op_kernel = self.build_jit() op_kernel = self.build_jit()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment