diff options
author | Allan Saddi <allan@saddi.com> | 2006-01-15 18:20:03 +0000 |
---|---|---|
committer | Allan Saddi <allan@saddi.com> | 2006-01-15 18:20:03 +0000 |
commit | a50fbcdb8df6ca67809547f03771c6c424756c06 (patch) | |
tree | 68d93c17e2c2529872b4f842ac4b47e0cd7054f9 | |
parent | 6f8f99d9f8724c7536216eb095a0ca1f0e6f3633 (diff) | |
download | flup-a50fbcdb8df6ca67809547f03771c6c424756c06.tar.gz |
Don't eat ImportErrors in ImportingModuleResolvers.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | flup/resolver/importingmodule.py | 5 |
2 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2006-01-15 Allan Saddi <asaddi@ganymede.saddi.net> + + * Change the behavior of ImportingModuleResolver when dealing + with ImportErrors. Previously, it would act as if the module + did not exist. Now, it propagates the exception to another + level (outer middleware or WSGI). Reported by Scot Doyle. + 2006-01-05 Allan Saddi <asaddi@kalahari.flup.org> * Improve Windows compatibility by conditionally installing diff --git a/flup/resolver/importingmodule.py b/flup/resolver/importingmodule.py index af0d712..643fb4d 100644 --- a/flup/resolver/importingmodule.py +++ b/flup/resolver/importingmodule.py @@ -90,10 +90,7 @@ class ImportingModuleResolver(Resolver): module = None if module_name and (module_name[0] != '_' or redirect) and \ not module_name.count('.'): - try: - module = _import_module(module_name, path=self.path) - except: - pass + module = _import_module(module_name, path=self.path) if module is not None: if func_name and (func_name[0] != '_' or redirect): |