summaryrefslogtreecommitdiff
path: root/django/bin
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-17 10:25:43 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-17 10:25:43 +0000
commit23404cdec46a4898bb287c92c4903f54ab8bfcdd (patch)
treeaf64b37872c628e4f5f7420eaf6f77898924f112 /django/bin
parentc92ce31d6042eee7372d38f09042d0667842b83d (diff)
downloaddjango-23404cdec46a4898bb287c92c4903f54ab8bfcdd.tar.gz
Fixed #4899 -- Fixed a problem with PO file header generation caused by [5708].
Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/bin')
-rwxr-xr-xdjango/bin/make-messages.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/bin/make-messages.py b/django/bin/make-messages.py
index acea73c039..e824611ca3 100755
--- a/django/bin/make-messages.py
+++ b/django/bin/make-messages.py
@@ -9,6 +9,7 @@ import re
import os
import sys
import getopt
+from itertools import dropwhile
pythonize_re = re.compile(r'\n\s*//')
@@ -118,7 +119,7 @@ def make_messages():
msgs = msgs.replace(old, new)
if os.path.exists(potfile):
# Strip the header
- msgs = '\n'.join(msgs.split('\n')[17:])
+ msgs = '\n'.join(dropwhile(len, msgs.split('\n')))
else:
msgs = msgs.replace('charset=CHARSET', 'charset=UTF-8')
if msgs: