[Zope-Checkins]
CVS: Zope/lib/python/Products/PluginIndexes/DateRangeIndex
- DateRangeIndex.py:1.10
Chris McDonough
cvs-admin at zope.org
Tue Nov 4 17:04:39 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateRangeIndex
In directory cvs.zope.org:/tmp/cvs-serv25897
Modified Files:
DateRangeIndex.py
Log Message:
Raise an OverflowError to be in parity with DateIndex.
=== Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py 1.9 => 1.10 ===
--- Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py:1.9 Tue Nov 4 09:53:28 2003
+++ Zope/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py Tue Nov 4 17:04:09 2003
@@ -406,8 +406,8 @@
if isinstance( value, DateTime ):
value = value.millis() / 1000 / 60 # flatten to minutes
result = int( value )
- if isinstance(result, long): # this won't work
- raise ValueError( '%s is not within the range of dates allowed'
+ if isinstance(result, long): # this won't work (Python 2.3)
+ raise OverflowError( '%s is not within the range of dates allowed'
'by a DateRangeIndex' % value)
return result
More information about the Zope-Checkins
mailing list