summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r--Lib/importlib/_bootstrap.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index c294490..58b5a46 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -383,14 +383,8 @@ class PyPycLoader(PyLoader):
def load_module(self, module):
"""Load a module from source or bytecode."""
name = module.__name__
- try:
- source_path = self.source_path(name)
- except ImportError:
- source_path = None
- try:
- bytecode_path = self.bytecode_path(name)
- except ImportError:
- bytecode_path = None
+ source_path = self.source_path(name)
+ bytecode_path = self.bytecode_path(name)
# get_code can worry about no viable paths existing.
module.__file__ = source_path or bytecode_path
return self._load_module(module)