[CMF-checkins] CVS: Products/CMFCalendar - Event.py:1.22
Yvo Schubbe
y.2005- at wcm-solutions.de
Tue Apr 5 05:27:24 EDT 2005
Update of /cvs-repository/Products/CMFCalendar
In directory cvs.zope.org:/tmp/cvs-serv4750/CMFCalendar
Modified Files:
Event.py
Log Message:
- replaced get_transaction() by the transaction API used in Zope 2.8
- added utils.transaction for Zope 2.7 compatibility
- replaced commit() by commit(1) in test_PortalFolder.py
- related import and whitespace cleanup
=== Products/CMFCalendar/Event.py 1.21 => 1.22 ===
--- Products/CMFCalendar/Event.py:1.21 Tue Aug 24 17:12:58 2004
+++ Products/CMFCalendar/Event.py Tue Apr 5 05:26:53 2005
@@ -15,25 +15,30 @@
$Id$
"""
+from AccessControl import ClassSecurityInfo
from DateTime import DateTime
from Globals import InitializeClass
-from AccessControl import ClassSecurityInfo
+try:
+ import transaction
+except ImportError:
+ # BBB: for Zope 2.7
+ from Products.CMFCore.utils import transaction
from webdav.Lockable import ResourceLockedError
from Products.CMFCore.PortalContent import PortalContent
-from Products.CMFCore.utils import keywordsplitter
from Products.CMFCore.utils import contributorsplitter
+from Products.CMFCore.utils import keywordsplitter
from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
+from Products.CMFDefault.utils import bodyfinder
from Products.CMFDefault.utils import formatRFC822Headers
from Products.CMFDefault.utils import html_headcheck
-from Products.CMFDefault.utils import SimpleHTMLParser
-from Products.CMFDefault.utils import bodyfinder
from Products.CMFDefault.utils import parseHeadersBody
+from Products.CMFDefault.utils import SimpleHTMLParser
-from permissions import View
-from permissions import ModifyPortalContent
from permissions import ChangeEvents
+from permissions import ModifyPortalContent
+from permissions import View
# Factory type information -- makes Events objects play nicely
# with the Types Tool (portal_types)
@@ -405,7 +410,7 @@
)
except ResourceLockedError, msg:
- get_transaction().abort()
+ transaction.abort()
RESPONSE.setStatus(423)
return RESPONSE
More information about the CMF-checkins
mailing list