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
remotes/github/custis
vfilippov 2012-07-30 22:41:02 +00:00 committed by Vitaliy Filippov
parent b5ac9522cc
commit ac063ff93a
1 changed files with 2 additions and 4 deletions

View File

@ -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)