From ac063ff93a7f84a469cdcb55cc5532ccec88d8a4 Mon Sep 17 00:00:00 2001 From: vfilippov Date: Mon, 30 Jul 2012 22:41:02 +0000 Subject: [PATCH] Bug 82651 - 500 instead of 404 on module import errors git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1591 6955db30-a419-402b-8a0d-67ecbb4d7f56 --- bin/mod_python/handler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/mod_python/handler.py b/bin/mod_python/handler.py index 6ccabe9d..792a9d23 100755 --- a/bin/mod_python/handler.py +++ b/bin/mod_python/handler.py @@ -20,10 +20,8 @@ import os.path def handler(req): path, module_name = os.path.split(req.filename) module_name, module_ext = os.path.splitext(module_name) - try: - module = apache.import_module(module_name, path=[path]) - except ImportError: - raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND + # Let it be 500 Internal Server Error in case of import error + module = apache.import_module(module_name, path=[path]) req.add_common_vars() module.index(req)