[FIX] base: import po file with comments only

Do not crash when importing a po file with only comments lines (e.g.
autogenerated files)
Fixes #4887
This commit is contained in:
Christophe Combelles
2015-04-13 11:38:42 +02:00
committed by Martin Trigaux
parent 856bc6f2b1
commit 737728a7a0
+2
View File
@@ -329,6 +329,8 @@ class TinyPoFile(object):
elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'):
fuzzy = True
line = self.lines.pop(0).strip()
if not self.lines:
raise StopIteration()
while not line:
# allow empty lines between comments and msgid
line = self.lines.pop(0).strip()