[tor-commits] [bridgedb/master] Drop unicode argument from gettext.install()

phw at torproject.org phw at torproject.org
Wed Feb 19 18:26:37 UTC 2020


commit 0ac0e46a2afaa67cbf6719770e4fff592f148496
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon Jan 13 19:02:30 2020 -0800

    Drop unicode argument from gettext.install()
    
    Oops, I removed this deprecated argument from gettext.translation's install
    method but I missed that there were similar calls to this function as well.
    
    This changes the test results as follows...
    
      before: FAILED (skips=109, failures=18, errors=383, successes=470)
      after:  FAILED (skips=109, failures=24, errors=364, successes=483)
---
 bridgedb/distributors/https/server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bridgedb/distributors/https/server.py b/bridgedb/distributors/https/server.py
index db7e2fe..d1c058c 100644
--- a/bridgedb/distributors/https/server.py
+++ b/bridgedb/distributors/https/server.py
@@ -373,7 +373,7 @@ class TranslatedTemplateResource(CustomErrorHandlingResource, CSPResource):
         """Create a new :api:`Resource <twisted.web.resource.Resource>` for a
         Mako-templated webpage.
         """
-        gettext.install("bridgedb", unicode=True)
+        gettext.install("bridgedb")
         CSPResource.__init__(self)
         self.template = template
 
@@ -888,7 +888,7 @@ class BridgesResource(CustomErrorHandlingResource, CSPResource):
         :param bool includeFingerprints: Do we include the bridge's
             fingerprint in the response?
         """
-        gettext.install("bridgedb", unicode=True)
+        gettext.install("bridgedb")
         CSPResource.__init__(self)
         self.distributor = distributor
         self.schedule = schedule





More information about the tor-commits mailing list