fix check builtin module ()

pull/1572/head^2
Mashiro 2024-09-11 18:45:24 +08:00 committed by GitHub
parent 85c83ba616
commit 5e736b143b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions
mmengine/config

View File

@ -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