[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:
parent
856bc6f2b1
commit
737728a7a0
|
@ -329,6 +329,8 @@ class TinyPoFile(object):
|
||||||
elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'):
|
elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'):
|
||||||
fuzzy = True
|
fuzzy = True
|
||||||
line = self.lines.pop(0).strip()
|
line = self.lines.pop(0).strip()
|
||||||
|
if not self.lines:
|
||||||
|
raise StopIteration()
|
||||||
while not line:
|
while not line:
|
||||||
# allow empty lines between comments and msgid
|
# allow empty lines between comments and msgid
|
||||||
line = self.lines.pop(0).strip()
|
line = self.lines.pop(0).strip()
|
||||||
|
|
Loading…
Reference in New Issue