[Zope-CVS] CVS: Products/CompositePage - slot.py:1.3
Shane Hathaway
shane at zope.com
Wed Oct 1 17:00:23 EDT 2003
Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv14977
Modified Files:
slot.py
Log Message:
Made compatible with Python 2.1 and Zope 2.6
=== Products/CompositePage/slot.py 1.2 => 1.3 ===
--- Products/CompositePage/slot.py:1.2 Wed Oct 1 14:59:31 2003
+++ Products/CompositePage/slot.py Wed Oct 1 16:59:52 2003
@@ -24,10 +24,16 @@
from Acquisition import aq_base, aq_inner, aq_parent
from ZODB.POSException import ConflictError
from OFS.SimpleItem import SimpleItem
-from OFS.OrderedFolder import OrderedFolder
from DocumentTemplate.DT_Util import safe_callable
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from AccessControl import ClassSecurityInfo
+
+try:
+ # Use OrderedFolder if it's available.
+ from OFS.OrderedFolder import OrderedFolder
+except ImportError:
+ # Fall back to normal folders, which happen to retain order anyway.
+ from OFS.Folder import Folder as OrderedFolder
from interfaces import ISlot
import perm_names
More information about the Zope-CVS
mailing list