aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/i18n.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2016-12-05 11:38:33 -0800
committerMark Sapiro <mark@msapiro.net>2016-12-05 11:38:33 -0800
commit33ba5f0a621f9720e7a4d289cdde57f21be949ca (patch)
tree2ccbdb52c3d39e3af90364cf8098cc8ce733b3fb /Mailman/i18n.py
parent62c260510d4918841d320d1dfc760238e87b8af6 (diff)
downloadmailman2-33ba5f0a621f9720e7a4d289cdde57f21be949ca.tar.gz
mailman2-33ba5f0a621f9720e7a4d289cdde57f21be949ca.tar.xz
mailman2-33ba5f0a621f9720e7a4d289cdde57f21be949ca.zip
Fixed a NameError issue in bin/add_members with DISABLE_COMMAND_LOCALE_CSET = yes.
Diffstat (limited to 'Mailman/i18n.py')
-rw-r--r--Mailman/i18n.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
index b8b527e0..605d4e76 100644
--- a/Mailman/i18n.py
+++ b/Mailman/i18n.py
@@ -35,6 +35,8 @@ def _get_ctype_charset():
if not mm_cfg.DISABLE_COMMAND_LOCALE_CSET:
_ctype_charset = _get_ctype_charset()
+else:
+ _ctype_charset = None
@@ -108,7 +110,7 @@ def _(s, frame=1):
def tolocale(s):
global _ctype_charset
- if isinstance(s, UnicodeType):
+ if isinstance(s, UnicodeType) or _ctype_charset is None:
return s
source = _translation.charset ()
if not source: