[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.98
Matthew T. Kromer
matt@zope.com
Fri, 25 Oct 2002 10:49:28 -0400
Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv2269/DCOracle2
Modified Files:
DCOracle2.py
Log Message:
Fred's way of providing backwards compatible StopIteration is nicer
=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.97 => 1.98 ===
--- Products/DCOracle2/DCOracle2/DCOracle2.py:1.97 Fri Oct 25 10:35:26 2002
+++ Products/DCOracle2/DCOracle2/DCOracle2.py Fri Oct 25 10:49:27 2002
@@ -133,8 +133,12 @@
# For the next() idiom which is Python 2.2, there is no StopIteration in
# earlier pythons
-if split(sys.version)[0] < '2.2.0':
- StopIteration = IndexError
+
+try:
+ StopIteration
+except NameError:
+ class StopIteration(Exception):
+ pass
def registerDateConversion(x):
global DateConversion