summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurélien Bompard2013-10-11 17:37:37 +0200
committerAurélien Bompard2013-10-11 17:37:37 +0200
commit8e6cad997c026cfa81e23043531a2a0ac8c1c6a0 (patch)
tree267bddbbb80f76258a1d98433d093a449caf5a1e /src
parent57dda2005b0074d083ccb309fea61eed9a8ecb18 (diff)
downloadmailman-8e6cad997c026cfa81e23043531a2a0ac8c1c6a0.tar.gz
mailman-8e6cad997c026cfa81e23043531a2a0ac8c1c6a0.tar.zst
mailman-8e6cad997c026cfa81e23043531a2a0ac8c1c6a0.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/utilities/importer.py4
-rw-r--r--src/mailman/utilities/tests/test_import.py6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/mailman/utilities/importer.py b/src/mailman/utilities/importer.py
index 3ee2951bb..9eb0fdf35 100644
--- a/src/mailman/utilities/importer.py
+++ b/src/mailman/utilities/importer.py
@@ -136,14 +136,14 @@ def check_language_code(code):
msg = """Missing language: {0}
You must add a section describing this language in your mailman.cfg file.
This section should look like this:
-[language.{1}]
+[language.{0}]
# The English name for the language.
description: CHANGE ME
# And the default character set for the language.
charset: utf-8
# Whether the language is enabled or not.
enabled: yes
-""".format(code, code[:2])
+""".format(code)
raise Import21Error(msg)
return code
diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py
index 5a317fedb..23cf74b36 100644
--- a/src/mailman/utilities/tests/test_import.py
+++ b/src/mailman/utilities/tests/test_import.py
@@ -254,8 +254,7 @@ class TestBasicImport(unittest.TestCase):
self._import()
except Import21Error, e:
# check the message
- self.assertTrue("xx_XX" in str(e))
- self.assertTrue("[language.xx]" in str(e))
+ self.assertTrue("[language.xx_XX]" in str(e))
else:
self.fail("Import21Error was not raised")
@@ -588,8 +587,7 @@ class TestRosterImport(unittest.TestCase):
import_config_pck(self._mlist, self._pckdict)
except Import21Error, e:
# check the message
- self.assertTrue("xx_XX" in str(e))
- self.assertTrue("[language.xx]" in str(e))
+ self.assertTrue("[language.xx_XX]" in str(e))
else:
self.fail("Import21Error was not raised")