po files: allow empty lines between comments and msgid

bzr revid: christophe@tinyerp.com-20081015074953-rx39rgezl92egybn
This commit is contained in:
Christophe Simonis
2008-10-15 09:49:53 +02:00
parent 97e45867c0
commit 9d11c67875
+3
View File
@@ -116,6 +116,9 @@ class TinyPoFile(object):
if line.startswith('#:'):
tmp_tnrs.append( line[2:].strip().split(':') )
line = self.lines.pop(0).strip()
while not line:
# allow empty lines between comments and msgid
line = self.lines.pop(0).strip()
if not line.startswith('msgid'):
raise Exception("malformed file: bad line: %s" % line)
source = unquote(line[6:])