def chain(env, startreq):
path = env["SCRIPT_FILENAME"]
mod = getmod(path)
entry = None
if mod is not None:
def chain(env, startreq):
path = env["SCRIPT_FILENAME"]
mod = getmod(path)
entry = None
if mod is not None:
elif hasattr(mod.mod, "application"):
entry = mod.mod.application
mod.entry = entry
elif hasattr(mod.mod, "application"):
entry = mod.mod.application
mod.entry = entry
if entry is not None:
return entry(env, startreq)
return wsgiutil.simpleerror(env, startreq, 500, "Internal Error", "Invalid WSGI handler.")
if entry is not None:
return entry(env, startreq)
return wsgiutil.simpleerror(env, startreq, 500, "Internal Error", "Invalid WSGI handler.")