[Zope3-checkins] CVS: Zope3/src/zope/tal - talgenerator.py:1.9.4.8

Godefroid Chapelle gotcha at swing.be
Thu Aug 14 12:56:44 EDT 2003


Update of /cvs-repository/Zope3/src/zope/tal
In directory cvs.zope.org:/tmp/cvs-serv25005

Modified Files:
      Tag: srichter-i18n-macro-interaction-branch
	talgenerator.py 
Log Message:
- port of fix for #539 in collector from 2.x



=== Zope3/src/zope/tal/talgenerator.py 1.9.4.7 => 1.9.4.8 ===
--- Zope3/src/zope/tal/talgenerator.py:1.9.4.7	Thu Aug 14 10:49:42 2003
+++ Zope3/src/zope/tal/talgenerator.py	Thu Aug 14 11:56:10 2003
@@ -278,7 +278,7 @@
             else:
                 self.emit("setGlobal", name, cexpr)
 
-    def emitOnError(self, name, onError):
+    def emitOnError(self, name, onError, TALtag, isend):
         block = self.popProgram()
         key, expr = parseSubstitution(onError)
         cexpr = self.compileExpression(expr)
@@ -287,7 +287,10 @@
         else:
             assert key == "structure"
             self.emit("insertStructure", cexpr, {}, [])
-        self.emitEndTag(name)
+        if TALtag:
+            self.emitOptTag(name, (None, 1), isend)
+        else:
+            self.emitEndTag(name)
         handler = self.popProgram()
         self.emit("onError", block, handler)
 
@@ -609,7 +612,11 @@
             todo["scope"] = 1
         if onError:
             self.pushProgram() # handler
+            if TALtag:
+                self.pushProgram() # start
             self.emitStartTag(name, list(attrlist)) # Must copy attrlist!
+            if TALtag:
+                self.pushProgram() # start
             self.pushProgram() # block
             todo["onError"] = onError
         if define:
@@ -790,7 +797,7 @@
         if condition:
             self.emitCondition(condition)
         if onError:
-            self.emitOnError(name, onError)
+            self.emitOnError(name, onError, optTag and optTag[1], isend)
         if scope:
             self.emit("endScope")
         if i18ncontext:




More information about the Zope3-Checkins mailing list