[Checkins] SVN: z3c.pt/trunk/ Fixed bug where pragma resulted in syntax error, if already set.

Malthe Borch mborch at gmail.com
Wed May 21 09:09:39 EDT 2008


Log message for revision 86878:
  Fixed bug where pragma resulted in syntax error, if already set.

Changed:
  U   z3c.pt/trunk/setup.py
  U   z3c.pt/trunk/z3c/pt/expressions.py
  U   z3c.pt/trunk/z3c/pt/translation.txt

-=-
Modified: z3c.pt/trunk/setup.py
===================================================================
--- z3c.pt/trunk/setup.py	2008-05-21 13:03:28 UTC (rev 86877)
+++ z3c.pt/trunk/setup.py	2008-05-21 13:09:39 UTC (rev 86878)
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = '0.8.3'
+version = '0.8.4'
 
 setup(name='z3c.pt',
       version=version,

Modified: z3c.pt/trunk/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/z3c/pt/expressions.py	2008-05-21 13:03:28 UTC (rev 86877)
+++ z3c.pt/trunk/z3c/pt/expressions.py	2008-05-21 13:09:39 UTC (rev 86878)
@@ -301,13 +301,14 @@
                         zope.component.queryUtility(
                             interfaces.IExpressionTranslation, name=pragma) or \
                         zope.component.queryAdapter(
-                            self, interfaces.IExpressionTranslation, name=pragma) or \
-                        self
-
-                    if translator is not self:
+                            self, interfaces.IExpressionTranslation, name=pragma)
+                    
+                    if translator is not None:
                         i += match.end()
                         continue
-            
+
+                    translator = self
+
             j = string.find('|', j + 1)
             if j == -1:
                 j = len(string)

Modified: z3c.pt/trunk/z3c/pt/translation.txt
===================================================================
--- z3c.pt/trunk/z3c/pt/translation.txt	2008-05-21 13:03:28 UTC (rev 86877)
+++ z3c.pt/trunk/z3c/pt/translation.txt	2008-05-21 13:09:39 UTC (rev 86878)
@@ -196,6 +196,7 @@
   ...          <span tal:replace="python: 5+5" />
   ...       </div>
   ...       <span tal:replace="path: mydict/a" />
+  ...       <span tal:replace="python: 1+1" />
   ...       <span tal:replace="path: mydict/b|True" />
   ...       <span tal:replace="int('a')|path: mydict/a" />
   ...   </tal:path-expression-testing>
@@ -209,6 +210,7 @@
            10
         </div>
         1
+        2
         True
         1
   <BLANKLINE>



More information about the Checkins mailing list