Commit 26b9b3e9 authored by Guido van Rossum's avatar Guido van Rossum

Robustify test for "at most one METAL attribute per element"

METALError exception (and slight rewording of message).  (This was
Tim's idea.)
parent 26dc1971
......@@ -324,13 +324,8 @@ class TALGenerator:
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
......
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