[Zope-Checkins]
CVS: Zope/lib/python/Products/PluginIndexes/DateIndex
- DateIndex.py:1.7.6.5
Tres Seaver
tseaver at zope.com
Fri Dec 19 15:02:14 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex
In directory cvs.zope.org:/tmp/cvs-serv28373/lib/python/Products/PluginIndexes/DateIndex
Modified Files:
Tag: Zope-2_6-branch
DateIndex.py
Log Message:
- D'oh! 'long' isn't a type under Python 2.1.
=== Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py 1.7.6.4 => 1.7.6.5 ===
--- Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py:1.7.6.4 Fri Dec 19 12:25:59 2003
+++ Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py Fri Dec 19 15:02:13 2003
@@ -14,7 +14,7 @@
"""$Id$
"""
-from types import StringType, FloatType, IntType
+from types import StringType, FloatType, IntType, LongType
from DateTime.DateTime import DateTime
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.UnIndex import UnIndex
@@ -189,7 +189,8 @@
t_val = ( ( ( ( yr * 12 + mo ) * 31 + dy ) * 24 + hr ) * 60 + mn )
- if isinstance(t_val, long):
+ #if isinstance(t_val, long): 'long' is not a type in Python 2.1!
+ if isinstance(t_val, LongType):
# t_val must be IntType, not LongType
raise OverflowError, (
"%s is not within the range of indexable dates (index: %s)"
More information about the Zope-Checkins
mailing list