[tor-commits] [bridgedb/master] Drop unicode argument from gettext's install
phw at torproject.org
phw at torproject.org
Wed Feb 19 18:26:37 UTC 2020
commit 61e82530f027463b164f9181ab3de1db08bd6668
Author: Damian Johnson <atagar at torproject.org>
Date: Mon Jan 13 16:10:54 2020 -0800
Drop unicode argument from gettext's install
Python 3.x is unicode by default and gettext doesn't have this argument any
longer so simply dropping it...
https://docs.python.org/3/library/gettext.html#gettext.NullTranslations.install
This fixes...
Traceback (most recent call last):
File "/home/atagar/Desktop/tor/bridgedb/bridgedb/test/test_translations.py", line 63, in test_getLocaleFromHTTPRequest_withLangParam_AcceptLanguage
parsed = translations.getLocaleFromHTTPRequest(request)
File "/home/atagar/Desktop/tor/bridgedb/bridgedb/translations.py", line 90, in getLocaleFromHTTPRequest
installTranslations(langs)
File "/home/atagar/Desktop/tor/bridgedb/bridgedb/translations.py", line 129, in installTranslations
language.install(unicode=True)
builtins.TypeError: install() got an unexpected keyword argument 'unicode'
Test results changed as follows...
before: FAILED (skips=106, failures=16, errors=266, successes=416)
after: FAILED (skips=106, failures=17, errors=258, successes=423)
---
bridgedb/translations.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bridgedb/translations.py b/bridgedb/translations.py
index f2b06e9..10c27fc 100644
--- a/bridgedb/translations.py
+++ b/bridgedb/translations.py
@@ -126,7 +126,7 @@ def installTranslations(langs):
except IOError as error:
logging.error(str(error))
- language.install(unicode=True)
+ language.install()
return language
def usingRTLLang(langs):
More information about the tor-commits
mailing list