[ZPT] CVS: Packages/TAL - TALGenerator.py:1.19

guido@digicool.com guido@digicool.com
Fri, 16 Mar 2001 22:27:51 -0500 (EST)


Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv4879

Modified Files:
	TALGenerator.py 
Log Message:
Robustify test for "at most one METAL attribute per element"
METALError exception (and slight rewording of message).  (This was
Tim's idea.)



--- Updated File TALGenerator.py in package Packages/TAL --
--- TALGenerator.py	2001/03/16 21:50:43	1.18
+++ TALGenerator.py	2001/03/17 03:27:51	1.19
@@ -324,13 +324,8 @@
         replace = taldict.get("replace")
         repeat = taldict.get("repeat")
         attrsubst = taldict.get("attributes")
-        n = 0
-        if defineMacro: n = n+1
-        if useMacro: n = n+1
-        if fillSlot: n = n+1
-        if defineSlot: n = n+1
-        if n > 1:
-            raise METALError("only one METAL attribute per element",
+        if len(metaldict) > 1:
+            raise METALError("at most one METAL attribute per element",
                              position)
         n = 0
         if content: n = n+1