[Zope-Checkins] CVS: Zope2 - RestrictionMutator.py:1.4

evan@serenade.digicool.com evan@serenade.digicool.com
Thu, 17 May 2001 17:42:28 -0400


Update of /cvs-repository/Zope2/lib/python/RestrictedPython
In directory serenade:/home/evan/Zope/trunk/lib/python/RestrictedPython

Modified Files:
	RestrictionMutator.py 
Log Message:
Fix "print >>None" and test it.



--- Updated File RestrictionMutator.py in package Zope2 --
--- RestrictionMutator.py	2001/05/14 16:41:35	1.3
+++ RestrictionMutator.py	2001/05/17 21:41:58	1.4
@@ -213,9 +213,11 @@
 
     def visitPrint(self, node, walker):
         node = walker.defaultVisitNode(node)
+        self.funcinfo._print_used = 1
         if node.dest is None:
-            self.funcinfo._print_used = 1
             node.dest = _print_target_name
+        else:
+            node.dest = ast.Or([node.dest, _print_target_name])
         return node
 
     visitPrintnl = visitPrint