From fcf97402082357b74eb7ee9b333158e5b0a4c0c3 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 4 Oct 2003 02:39:11 +0000 Subject: 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. Backported. --- Lib/gettext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/gettext.py b/Lib/gettext.py index 6c8a7df..ed9d3ea 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py @@ -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: -- cgit v0.12