[CMF-checkins] CVS: CMF/CMFDefault/skins/content - document_edit.py:1.7 metadata_edit.py:1.6 newsitem_edit.py:1.7

Yvo Schubbe schubbe at web.de
Wed Jan 7 11:31:47 EST 2004


Update of /cvs-repository/CMF/CMFDefault/skins/content
In directory cvs.zope.org:/tmp/cvs-serv21212/CMFDefault/skins/content

Modified Files:
	document_edit.py metadata_edit.py newsitem_edit.py 
Log Message:
- removed CMF* exception classes
- added some aliases for Zope exceptions to make them usable TTW
- replaced EditingConflict string by class exception


=== CMF/CMFDefault/skins/content/document_edit.py 1.6 => 1.7 ===
--- CMF/CMFDefault/skins/content/document_edit.py:1.6	Thu Sep 25 07:36:49 2003
+++ CMF/CMFDefault/skins/content/document_edit.py	Wed Jan  7 11:31:47 2004
@@ -2,8 +2,9 @@
 ##parameters=text_format, text, file='', SafetyBelt='', change_and_view=''
 ##title=Edit a document
 ##
-from Products.CMFCore.CMFCoreExceptions import CMFResourceLockedError
+from Products.CMFCore.CMFCoreExceptions import EditingConflict
 from Products.CMFCore.CMFCoreExceptions import IllegalHTML
+from Products.CMFCore.CMFCoreExceptions import ResourceLockedError
 from Products.CMFDefault.utils import scrubHTML
 from Products.PythonScripts.standard import urlencode
 
@@ -14,7 +15,7 @@
                 , file
                 , safety_belt=SafetyBelt
                 )
-except (CMFResourceLockedError, 'EditingConflict', IllegalHTML), msg:
+except (ResourceLockedError, EditingConflict, IllegalHTML), msg:
     message = msg
     action_id = 'edit'
 else:


=== CMF/CMFDefault/skins/content/metadata_edit.py 1.5 => 1.6 ===
--- CMF/CMFDefault/skins/content/metadata_edit.py:1.5	Thu Sep 25 07:36:49 2003
+++ CMF/CMFDefault/skins/content/metadata_edit.py	Wed Jan  7 11:31:47 2004
@@ -2,7 +2,7 @@
 ##parameters=allowDiscussion=None, title=None, subject=None, description=None, contributors=None, effective_date=None, expiration_date=None, format=None, language=None, rights=None, change_and_edit='', change_and_view=''
 ##title=Update Content Metadata
 ##
-from Products.CMFCore.CMFCoreExceptions import CMFResourceLockedError
+from Products.CMFCore.CMFCoreExceptions import ResourceLockedError
 from Products.CMFCore.utils import getToolByName
 from Products.PythonScripts.standard import urlencode
 dtool = getToolByName(script, 'portal_discussion')
@@ -59,7 +59,7 @@
                         , language=language
                         , rights=rights
                         )
-except CMFResourceLockedError, msg:
+except ResourceLockedError, msg:
     message = msg
     action_id = 'metadata'
 else:


=== CMF/CMFDefault/skins/content/newsitem_edit.py 1.6 => 1.7 ===
--- CMF/CMFDefault/skins/content/newsitem_edit.py:1.6	Thu Sep 25 07:36:49 2003
+++ CMF/CMFDefault/skins/content/newsitem_edit.py	Wed Jan  7 11:31:47 2004
@@ -2,8 +2,8 @@
 ##parameters=text, description, text_format=None, change_and_view=''
 ##title=Edit a news item
 ##
-from Products.CMFCore.CMFCoreExceptions import CMFResourceLockedError
 from Products.CMFCore.CMFCoreExceptions import IllegalHTML
+from Products.CMFCore.CMFCoreExceptions import ResourceLockedError
 from Products.CMFDefault.utils import scrubHTML
 from Products.PythonScripts.standard import urlencode
 
@@ -12,7 +12,7 @@
     description = scrubHTML( description )
 
     context.edit(text=text, description=description, text_format=text_format)
-except (CMFResourceLockedError, IllegalHTML), msg:
+except (ResourceLockedError, IllegalHTML), msg:
     message = msg
     action_id = 'edit'
 else:




More information about the CMF-checkins mailing list