diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py index b0bff988d759..c721f366125e 100644 --- a/python/mozbuild/mozbuild/frontend/reader.py +++ b/python/mozbuild/mozbuild/frontend/reader.py @@ -977,7 +977,7 @@ class BuildReader(object): curdir = mozpath.dirname(path) gyp_contexts = [] - for target_dir in context['GYP_DIRS']: + for target_dir in context.get('GYP_DIRS', []): gyp_dir = context['GYP_DIRS'][target_dir] for v in ('input', 'variables'): if not getattr(gyp_dir, v):