[Zope-Checkins] CVS: Zope/lib/python/OFS - OrderSupport.py:1.2.2.2
Yvo Schubbe
schubbe at web.de
Sat Sep 20 07:00:25 EDT 2003
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv14306/lib/python/OFS
Modified Files:
Tag: Zope-2_7-branch
OrderSupport.py
Log Message:
fixed and unified raise statements
=== Zope/lib/python/OFS/OrderSupport.py 1.2.2.1 => 1.2.2.2 ===
--- Zope/lib/python/OFS/OrderSupport.py:1.2.2.1 Thu Aug 7 17:33:55 2003
+++ Zope/lib/python/OFS/OrderSupport.py Sat Sep 20 07:00:24 2003
@@ -151,8 +151,8 @@
try:
object = obj_dict[id]
except KeyError:
- raise (ValueError,
- 'The object with the id "%s" does not exist.' % id)
+ raise ValueError('The object with the id "%s" does not exist.'
+ % id)
old_position = objects.index(object)
new_position = max( old_position - abs(delta), min_position )
if new_position == min_position:
@@ -211,7 +211,7 @@
ids = self.objectIds()
if id in ids:
return ids.index(id)
- raise ValueError, 'The object with the id "%s" does not exist.' % id
+ raise ValueError('The object with the id "%s" does not exist.' % id)
security.declareProtected(manage_properties, 'moveObjectToPosition')
def moveObjectToPosition(self, id, position):
More information about the Zope-Checkins
mailing list