[Python-checkins] python/dist/src/Lib gettext.py,1.21,1.22

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Fri Oct 3 22:28:33 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv29770

Modified Files:
	gettext.py 
Log Message:
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.


Index: gettext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gettext.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** gettext.py	20 May 2003 17:26:48 -0000	1.21
--- gettext.py	4 Oct 2003 02:28:31 -0000	1.22
***************
*** 262,266 ****
              if mlen == 0:
                  # Catalog description
!                 lastk = None
                  for item in tmsg.splitlines():
                      item = item.strip()
--- 262,266 ----
              if mlen == 0:
                  # Catalog description
!                 lastk = k = None
                  for item in tmsg.splitlines():
                      item = item.strip()





More information about the Python-checkins mailing list