mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
fix check builtin module (#1571)
This commit is contained in:
parent
85c83ba616
commit
5e736b143b
@ -176,7 +176,8 @@ def _is_builtin_module(module_name: str) -> bool:
|
||||
return False
|
||||
origin_path = osp.abspath(origin_path)
|
||||
if ('site-package' in origin_path or 'dist-package' in origin_path
|
||||
or not origin_path.startswith(PYTHON_ROOT_DIR)):
|
||||
or not origin_path.startswith(
|
||||
(PYTHON_ROOT_DIR, '/usr/lib/python'))):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user