Skip to content

Commit

Permalink
Bug 1585672 - [mach] Skip modules whose __file__ attribute is None in…
Browse files Browse the repository at this point in the history
… the global ImportHook r=ahal

This also gets around a flake8 lint exception.

Differential Revision: https://phabricator.services.mozilla.com/D47946
  • Loading branch information
Mardak committed Oct 2, 2019
1 parent 4708084 commit 5e53846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/mach_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def __call__(self, name, globals=None, locals=None, fromlist=None,
self._modules.add(resolved_name)

# Builtin modules don't have a __file__ attribute.
if not hasattr(module, '__file__'):
if not getattr(module, '__file__', None):
return module

# Note: module.__file__ is not always absolute.
Expand Down

0 comments on commit 5e53846

Please sign in to comment.