Skip to content

Commit 5e736b1

Browse files
authored
fix check builtin module (#1571)
1 parent 85c83ba commit 5e736b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmengine/config/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ def _is_builtin_module(module_name: str) -> bool:
176176
return False
177177
origin_path = osp.abspath(origin_path)
178178
if ('site-package' in origin_path or 'dist-package' in origin_path
179-
or not origin_path.startswith(PYTHON_ROOT_DIR)):
179+
or not origin_path.startswith(
180+
(PYTHON_ROOT_DIR, '/usr/lib/python'))):
180181
return False
181182
else:
182183
return True

0 commit comments

Comments
 (0)