Kaydet (Commit) 3c1ff5c7 authored tarafından Fred Drake's avatar Fred Drake

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.
üst 0047e16d
......@@ -487,7 +487,10 @@ class TableHandler(xml.sax.handler.ContentHandler):
if attrs.has_key("outputname"):
self.__current.outputname = attrs.get("outputname")
def end_macro(self):
self.__table[self.__current.name] = self.__current
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
def start_attribute(self, attrs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment