fix check builtin module (#1571)
parent
85c83ba616
commit
5e736b143b
mmengine/config
|
@ -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…
Reference in New Issue