summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-10-04 02:28:31 (GMT)
committerBarry Warsaw <barry@python.org>2003-10-04 02:28:31 (GMT)
commitb8c787606cfd5bbef2e826ee854f424483e814e2 (patch)
tree5ef5b09342cf310f18adc67ec3d427028b76c9d3 /Lib
parentf64ec0f2a1048fde833cb81f1ee199d0d2b507ac (diff)
downloadcpython-b8c787606cfd5bbef2e826ee854f424483e814e2.zip
cpython-b8c787606cfd5bbef2e826ee854f424483e814e2.tar.gz
cpython-b8c787606cfd5bbef2e826ee854f424483e814e2.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/gettext.py2
1 files changed, 1 insertions, 1 deletions
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: