summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-09-12 10:59:32 +0200
committerJose <jose@zeroc.com>2013-09-12 10:59:32 +0200
commit78300e854f9153e87b3caed95c0fe0de33142c75 (patch)
tree2d3f386bc154d2fe45a4463d05f1cf6f0ddee13d
parentminor edits to CHANGES (diff)
downloadice-78300e854f9153e87b3caed95c0fe0de33142c75.tar.bz2
ice-78300e854f9153e87b3caed95c0fe0de33142c75.tar.xz
ice-78300e854f9153e87b3caed95c0fe0de33142c75.zip
minor fix - Python 3.x lacks xrange.
-rw-r--r--py/test/Ice/exceptions/AllTests.py6
-rw-r--r--py/test/Ice/exceptions/TestI.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py
index 370bfd5edb1..002fda5b7e1 100644
--- a/py/test/Ice/exceptions/AllTests.py
+++ b/py/test/Ice/exceptions/AllTests.py
@@ -9,6 +9,12 @@
import Ice, Test, threading, sys, array
+#
+# There isn't xrange in python 3.x
+#
+if sys.version_info.major >= 3:
+ xrange = range
+
def test(b):
if not b:
raise RuntimeError('test assertion failed')
diff --git a/py/test/Ice/exceptions/TestI.py b/py/test/Ice/exceptions/TestI.py
index 64ed7f470fe..84ebcc9e1f5 100644
--- a/py/test/Ice/exceptions/TestI.py
+++ b/py/test/Ice/exceptions/TestI.py
@@ -9,6 +9,12 @@
import Ice, Test, array
+#
+# There isn't xrange in python 3.x
+#
+if sys.version_info.major >= 3:
+ xrange = range
+
class ThrowerI(Test.Thrower):
def shutdown(self, current=None):
current.adapter.getCommunicator().shutdown()