[Zodb-checkins] CVS: Zope/lib/python/ZConfig - datatypes.py:1.15
Fred L. Drake, Jr.
fred at zope.com
Fri Jul 11 11:44:48 EDT 2003
Update of /cvs-repository/Zope/lib/python/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv1556
Modified Files:
datatypes.py
Log Message:
Avoid a nuisance exception in Python 2.3 when all warnings are turned
into errors.
=== Zope/lib/python/ZConfig/datatypes.py 1.14 => 1.15 ===
--- Zope/lib/python/ZConfig/datatypes.py:1.14 Thu Jul 3 16:15:26 2003
+++ Zope/lib/python/ZConfig/datatypes.py Fri Jul 11 10:44:40 2003
@@ -111,14 +111,13 @@
RegularExpressionConversion.__init__(self, "[_a-zA-Z][_a-zA-Z0-9]*")
-if sys.version[:3] < "2.3":
- def integer(value):
- try:
- return int(value)
- except ValueError:
- return long(value)
-else:
- integer = int
+def integer(value):
+ try:
+ return int(value)
+ except ValueError:
+ return long(value)
+ except OverflowError:
+ return long(value)
def null_conversion(value):
More information about the Zodb-checkins
mailing list