[Python-checkins] r58483 - sandbox/trunk/import_in_py/Py3K/_importlib.py

brett.cannon python-checkins at python.org
Mon Oct 15 22:02:54 CEST 2007


Author: brett.cannon
Date: Mon Oct 15 22:02:54 2007
New Revision: 58483

Modified:
   sandbox/trunk/import_in_py/Py3K/_importlib.py
Log:
Remove an apparently unneeded try/except clause.


Modified: sandbox/trunk/import_in_py/Py3K/_importlib.py
==============================================================================
--- sandbox/trunk/import_in_py/Py3K/_importlib.py	(original)
+++ sandbox/trunk/import_in_py/Py3K/_importlib.py	Mon Oct 15 22:02:54 2007
@@ -509,11 +509,8 @@
     @check_name
     def load_module(self, fullname):
         """Load a Python source or bytecode file."""
-        try:
-            code_object, path = self._handler(fullname, self._source_path(),
-                                                self._bytecode_path())
-        except ValueError:
-            raise ImportError("loader cannot handle %s" % fullname)
+        code_object, path = self._handler(fullname, self._source_path(),
+                                            self._bytecode_path())
         return self._module_init(code_object, fullname, path, self._is_pkg)
 
     @check_name


More information about the Python-checkins mailing list