Skip None paths when looking for modules

Change-Id: I49fb38b56f868a730b622e20cf8d5781f13fe5e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30580
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
dan sinclair 2020-10-20 14:46:10 +00:00 committed by Commit Bot service account
parent e557087870
commit e8022eaf59
1 changed files with 4 additions and 0 deletions

View File

@ -201,6 +201,10 @@ def _compute_python_dependencies(root_dir=None):
paths = set() paths = set()
for path in module_paths: for path in module_paths:
# Builtin/namespaced modules may return None for the file path.
if not path:
continue
path = os.path.abspath(path) path = os.path.abspath(path)
if not path.startswith(root_dir): if not path.startswith(root_dir):