Commit b8c78760 authored by Barry Warsaw's avatar Barry Warsaw

GNUTranslations._parse(): Initialize local variable k so that if the

first line of a header section isn't an RFC-ish header, it's just
ignored instead of throwing an UnboundLocalError.

Backport candidate.
parent f64ec0f2
...@@ -261,7 +261,7 @@ class GNUTranslations(NullTranslations): ...@@ -261,7 +261,7 @@ class GNUTranslations(NullTranslations):
# See if we're looking at GNU .mo conventions for metadata # See if we're looking at GNU .mo conventions for metadata
if mlen == 0: if mlen == 0:
# Catalog description # Catalog description
lastk = None lastk = k = None
for item in tmsg.splitlines(): for item in tmsg.splitlines():
item = item.strip() item = item.strip()
if not item: if not item:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment