Author: jvloothuis
Date: Sat Feb  2 14:01:09 2008
New Revision: 51210

Modified:
   kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
   kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
Log:

Changes made to make kss.zope work on Zope 2 again after the Zope
3/Grok changes.

Ecmaunit tests work now. This means all Selenium tests pass!


Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py 
(original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py Sat Feb 
 2 14:01:09 2008
@@ -1,20 +1,21 @@
 from kss.base.plugin import Plugin
 
-try:
-    from kss.demo.resource import (
-        KSSDemo,
-        KSSSeleniumTestDirectory,
-        )
-except ImportError:
-    demos = False
+def core_demos():
+    try:
+        from kss.demo.resource import (
+            KSSDemo,
+            KSSSeleniumTestDirectory,
+            )
+    except ImportError: # no demo package installed
+        return Plugin()
+
+
+    class CoreDemos(Plugin):
 
-class CoreDemos(Plugin):
-    if demos:
         zope_demos = (
             # List your demos here. 
             # (Second parameter can be a subcategory within the demo if 
needed.)
             KSSDemo('', 'Core syntax', 'binderids.html', 'Binder ids'),
-
             )
 
         # directories are relative from the location of this .py file
@@ -23,3 +24,5 @@
             # need not change anything here.
             KSSSeleniumTestDirectory('selenium_tests'),
             )
+    return CoreDemos()
+

Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py   (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py   Sat Feb  2 
14:01:09 2008
@@ -1,14 +1,17 @@
 from kss.base.plugin import Plugin
-try:
-    from kss.demo.resource import (
-        KSSDemo,
-        KSSSeleniumTestDirectory,
-        )
-except ImportError:
-    demos = False
 
-class CoreDemos(Plugin):
-    if demos:
+def core_demos():
+    try:
+        from kss.demo.resource import (
+            KSSDemo,
+            KSSSeleniumTestDirectory,
+            )
+    except ImportError: # no demo package installed
+        return Plugin()
+
+
+    class CoreDemos(Plugin):
+
         zope_demos = (
             KSSDemo('', '', "basic_commands.html", "Change tag content"),
             KSSDemo('', '', "two_selects.html", "Two selects"),
@@ -36,3 +39,4 @@
         zope_selenium_testsuites = (
             KSSSeleniumTestDirectory('selenium_tests'),
             )
+    return CoreDemos()
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to