[Checkins] SVN: Sandbox/cklinger/megrok.resource/trunk/src/megrok/resource/event.py If include directive is not set, we can't iterate.

Souheil CHELFOUH souheil at chelfouh.com
Sun Dec 20 12:55:50 EST 2009


Log message for revision 106811:
  If include directive is not set, we can't iterate.
  Added a test i the event.
  

Changed:
  U   Sandbox/cklinger/megrok.resource/trunk/src/megrok/resource/event.py

-=-
Modified: Sandbox/cklinger/megrok.resource/trunk/src/megrok/resource/event.py
===================================================================
--- Sandbox/cklinger/megrok.resource/trunk/src/megrok/resource/event.py	2009-12-20 15:38:45 UTC (rev 106810)
+++ Sandbox/cklinger/megrok.resource/trunk/src/megrok/resource/event.py	2009-12-20 17:55:50 UTC (rev 106811)
@@ -10,5 +10,6 @@
 def handle_inclusion(view, event):
     view = removeSecurityProxy(view)
     needs = include.bind().get(view)
-    for resource in needs:
-        resource.need()
+    if needs:
+        for resource in needs:
+            resource.need()



More information about the checkins mailing list