[tor-commits] [bridgedb/develop] Fix unhandled traceback in HTTPServer.WebRoot.render_GET() for #6127.
isis at torproject.org
isis at torproject.org
Sat Feb 1 23:57:39 UTC 2014
commit aa2885b789acd388621ac5cea955f54c3ae96ae3
Author: Isis Lovecruft <isis at torproject.org>
Date: Fri Jan 24 03:40:00 2014 +0000
Fix unhandled traceback in HTTPServer.WebRoot.render_GET() for #6127.
---
lib/bridgedb/HTTPServer.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index ea10e0b..32399b3 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -305,7 +305,16 @@ class WebRoot(twisted.web.resource.Resource):
:type request: :api:`twisted.web.server.Request`
:param request: An incoming request.
"""
- rtl = usingRTLLang(request)
+ rtl = False
+
+ try:
+ rtl = usingRTLLang(request)
+ except Exception as err:
+ logging.exception(err)
+ logging.error("The gettext files were not properly installed.")
+ logging.info("To install translations, try doing `python " \
+ "setup.py compile_catalog`.")
+
return lookup.get_template('index.html').render(rtl=rtl)
More information about the tor-commits
mailing list