diff options
author | Andrew Kuchling <amk@amk.ca> | 2015-04-13 14:38:56 (GMT) |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2015-04-13 14:38:56 (GMT) |
commit | 8b963c5853519533ef7188effcde9159c56780d1 (patch) | |
tree | 444217235c3ec75142940e013ef2c7978129e076 /Lib/gettext.py | |
parent | 770b08e8e2ec7aa0028f4e94e3f27f1d545aee3e (diff) | |
download | cpython-8b963c5853519533ef7188effcde9159c56780d1.zip cpython-8b963c5853519533ef7188effcde9159c56780d1.tar.gz cpython-8b963c5853519533ef7188effcde9159c56780d1.tar.bz2 |
#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 d38fda2..8caf1d1 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() |