diff options
author | Andrew Kuchling <amk@amk.ca> | 2015-04-13 10:38:56 -0400 |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2015-04-13 10:38:56 -0400 |
commit | 8b963c5853519533ef7188effcde9159c56780d1 (patch) | |
tree | 444217235c3ec75142940e013ef2c7978129e076 /Lib/gettext.py | |
parent | #23883: add names missing from __all__ (l*gettext, bind_textdomain_codeset) (diff) | |
download | cpython-8b963c5853519533ef7188effcde9159c56780d1.tar.gz cpython-8b963c5853519533ef7188effcde9159c56780d1.tar.bz2 cpython-8b963c5853519533ef7188effcde9159c56780d1.zip |
#17898: reset k and v so that the loop doesn't use an old value
Diffstat (limited to 'Lib/gettext.py')
-rw-r--r-- | Lib/gettext.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py index d38fda2ef09..8caf1d12272 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py @@ -262,11 +262,12 @@ class GNUTranslations(NullTranslations): # See if we're looking at GNU .mo conventions for metadata if mlen == 0: # Catalog description - lastk = k = None + lastk = None for b_item in tmsg.split('\n'.encode("ascii")): item = b_item.decode().strip() if not item: continue + k = v = None if ':' in item: k, v = item.split(':', 1) k = k.strip().lower() |