summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-10-31 18:53:44 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-10-31 18:53:44 (GMT)
commit6ae5d7f2a132aa9690bfb59b8eebcc1fb7c792c8 (patch)
treeb27a35bd1f0e6d0129d674e0d9e0601d6177565f /Lib
parentc6ecfcd87655da599c8662e457f5e7a3c5408c9a (diff)
downloadcpython-6ae5d7f2a132aa9690bfb59b8eebcc1fb7c792c8.zip
cpython-6ae5d7f2a132aa9690bfb59b8eebcc1fb7c792c8.tar.gz
cpython-6ae5d7f2a132aa9690bfb59b8eebcc1fb7c792c8.tar.bz2
Fixed gettext module for Windows. The metadata lines always end in \n and not in os.linesep
Diffstat (limited to 'Lib')
-rw-r--r--Lib/gettext.py2
-rw-r--r--Lib/test/test_gettext.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py
index 533be3d..8ff0a80 100644
--- a/Lib/gettext.py
+++ b/Lib/gettext.py
@@ -291,7 +291,7 @@ class GNUTranslations(NullTranslations):
if mlen == 0:
# Catalog description
lastk = k = None
- for b_item in tmsg.split(os.linesep.encode("ascii")):
+ for b_item in tmsg.split('\n'.encode("ascii")):
item = str(b_item).strip()
if not item:
continue
diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index a32fa27..12a657c 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -332,6 +332,7 @@ class WeirdMetadataTest(GettextBaseTest):
def test_weird_metadata(self):
info = self.t.info()
+ self.assertEqual(len(info), 9)
self.assertEqual(info['last-translator'],
'John Doe <jdoe@example.com>\nJane Foobar <jfoobar@example.com>')