##// END OF EJS Templates
another small fix for error controller
marcink -
r312:91ba8489 default
parent child Browse files
Show More
@@ -9,6 +9,7 b' from pylons_app.lib.base import BaseCont'
9 from pylons.middleware import media_path
9 from pylons.middleware import media_path
10 from pylons_app.lib.utils import check_repo
10 from pylons_app.lib.utils import check_repo
11 import pylons_app.lib.helpers as h
11 import pylons_app.lib.helpers as h
12 from pylons_app import __version__
12 log = logging.getLogger(__name__)
13 log = logging.getLogger(__name__)
13
14
14 class ErrorController(BaseController):
15 class ErrorController(BaseController):
@@ -38,6 +39,7 b' class ErrorController(BaseController):'
38 if resp.status_int == 404:
39 if resp.status_int == 404:
39 org_e = request.environ.get('pylons.original_request').environ
40 org_e = request.environ.get('pylons.original_request').environ
40 c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1]
41 c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1]
42 c.hg_app_version = __version__
41 c.repo_name_cleaned = h.repo_name_slug(c.repo_name)
43 c.repo_name_cleaned = h.repo_name_slug(c.repo_name)
42 if check_repo(repo_name, g.base_path):
44 if check_repo(repo_name, g.base_path):
43 return render('/errors/error_404.html')
45 return render('/errors/error_404.html')
General Comments 0
You need to be logged in to leave comments. Login now