Mercurial > public > src > rhodecode
changeset 377:76f8bef61098
fixed path error for error controller
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 16 Jul 2010 14:10:29 +0200 |
parents | d09381593b12 |
children | a1e8912a89bc 07f50e9b308f |
files | pylons_app/controllers/error.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/controllers/error.py Thu Jul 15 06:25:43 2010 +0200 +++ b/pylons_app/controllers/error.py Fri Jul 16 14:10:29 2010 +0200 @@ -38,10 +38,14 @@ if resp.status_int == 404: org_e = request.environ.get('pylons.original_request').environ - c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1] + try: + c.repo_name = org_e['PATH_INFO'].split('/')[1] + except IndexError: + c.repo_name = '' + c.hg_app_version = __version__ c.repo_name_cleaned = h.repo_name_slug(c.repo_name) - if check_repo(repo_name, g.base_path): + if check_repo(c.repo_name, g.base_path): return render('/errors/error_404.html') c.error_message = cgi.escape(request.GET.get('code', str(resp.status)))