mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
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.
This commit is contained in:
parent
f64ec0f2a1
commit
b8c787606c
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue