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-67ecbb4d7f56remotes/github/custis
parent
b5ac9522cc
commit
ac063ff93a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue