Skip to content

Commit

Permalink
fix check builtin module (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOCHENYE authored Sep 11, 2024
1 parent 85c83ba commit 5e736b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmengine/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e736b1

Please sign in to comment.