mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08: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:
@@ -261,7 +261,7 @@ class GNUTranslations(NullTranslations):
|
||||
# See if we're looking at GNU .mo conventions for metadata
|
||||
if mlen == 0:
|
||||
# Catalog description
|
||||
lastk = None
|
||||
lastk = k = None
|
||||
for item in tmsg.splitlines():
|
||||
item = item.strip()
|
||||
if not item:
|
||||
|
||||
Reference in New Issue
Block a user