catch ImportError when C code not compiled (#575)

### What this PR does / why we need it?
Found a problem when ImportError raised but not ModuleNotFoundError.


### Does this PR introduce _any_ user-facing change?
No


### How was this patch tested?
CI passed

Signed-off-by: Shuqiao Li <celestialli@outlook.com>
This commit is contained in:
Shuqiao Li authored and GitHub committed 2025-04-18 18:11:49 +08:00
1 parent 985b0548b0
commit a127cc83f8
1 file changed
+1 -1
+1 -1
View File
@@ -65,7 +65,7 @@ try:
init_module, python_create_and_map, python_unmap_and_release)
lib_name = find_loaded_library("vllm_ascend_C")
camem_available = True
except ModuleNotFoundError as e:
except ImportError as e:
logger.error("Failed to import vllm_ascend_C:%s", e)
init_module = None
python_create_and_map = None