[Python-checkins] python/dist/src/Doc/tools/sgmlconv latex2esis.py,1.29,1.30

fdrake@sourceforge.net fdrake@sourceforge.net
2002年4月09日 21:20:36 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv
In directory usw-pr-cvs1:/tmp/cvs-serv18678
Modified Files:
	latex2esis.py 
Log Message:
When adding a name to the table of macros and environments, make sure it
is not already present. If it is, raise an exception, since that should not
happen in a well-defined conversion.
Index: latex2esis.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/latex2esis.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** latex2esis.py	5 Apr 2002 18:09:22 -0000	1.29
--- latex2esis.py	10 Apr 2002 04:20:33 -0000	1.30
***************
*** 488,492 ****
 self.__current.outputname = attrs.get("outputname")
 def end_macro(self):
! self.__table[self.__current.name] = self.__current
 self.__current = None
 
--- 488,495 ----
 self.__current.outputname = attrs.get("outputname")
 def end_macro(self):
! name = self.__current.name
! if self.__table.has_key(name):
! raise ValueError("name %s already in use" % `name`)
! self.__table[name] = self.__current
 self.__current = None
 

AltStyle によって変換されたページ (->オリジナル) /