[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Fix unhandled traceback in HTTPServer.WebRoot.render_GET() for #6127.



commit aa2885b789acd388621ac5cea955f54c3ae96ae3
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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)
 
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits