[Zope-Checkins] CVS: Zope/lib/python/OFS - PropertyManager.py:1.43.18.1 PropertySheets.py:1.82.18.1 SimpleItem.py:1.93.18.1
Casey Duncan
casey@zope.com
Wed, 27 Mar 2002 15:51:40 -0500
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv22094/lib/python/OFS
Modified Files:
Tag: casey-death_to_index_html-branch
PropertyManager.py PropertySheets.py SimpleItem.py
Log Message:
Updating branch to head for testing
=== Zope/lib/python/OFS/PropertyManager.py 1.43 => 1.43.18.1 ===
def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'."""
+ if REQUEST:
+ # Bugfix for property named "ids" (Casey)
+ if ids == self.getProperty('ids', None): ids = None
+ ids = REQUEST.get('_ids', ids)
if ids is None:
return MessageDialog(
title='No property specified',
=== Zope/lib/python/OFS/PropertySheets.py 1.82 => 1.82.18.1 ===
def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'."""
+ if REQUEST:
+ # Bugfix for properties named "ids" (casey)
+ if ids == self.getProperty('ids', None): ids = None
+ ids = REQUEST.get('_ids', ids)
if ids is None:
return MessageDialog(
title='No property specified',
=== Zope/lib/python/OFS/SimpleItem.py 1.93 => 1.93.18.1 ===
from Traversable import Traversable
from Acquisition import aq_base
+from DocumentTemplate.ustr import ustr
import time
import marshal
@@ -165,16 +166,15 @@
raise error_type, error_value, tb
if not error_message:
- if type(error_value) is InstanceType:
- try:
- s=str(error_value)
- except:
- pass
- else:
- if tagSearch(s) is not None:
- error_message=error_value
- elif (type(error_value) is StringType
- and tagSearch(error_value) is not None):
+ try:
+ s = ustr(error_value)
+ except:
+ s = error_value
+ try:
+ match = tagSearch(s)
+ except TypeError:
+ match = None
+ if match is not None:
error_message=error_value
if client is None: client=self
@@ -197,7 +197,8 @@
v = s(**kwargs)
else:
v = HTML.__call__(s, client, REQUEST, **kwargs)
- except: v = error_value or "Sorry, an error occurred"
+ except:
+ v = error_value or "Sorry, an error occurred"
raise error_type, v, tb
finally:
if hasattr(self, '_v_eek'): del self._v_eek