summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-12-17 05:01:32 +0000
committerGreg Hudson <ghudson@mit.edu>2011-12-17 05:01:32 +0000
commit2240347dd3cd3f1f9a068a22df037f2428c7bd7f (patch)
treebd7bc7b3978e3344d00e581aa8bbf28226501cf9
parente946963e0f8488a8d47c527cca31d4666c32e063 (diff)
downloadkrb5-2240347dd3cd3f1f9a068a22df037f2428c7bd7f.tar.gz
krb5-2240347dd3cd3f1f9a068a22df037f2428c7bd7f.tar.xz
krb5-2240347dd3cd3f1f9a068a22df037f2428c7bd7f.zip
Avoid using itertools.permutations in k5test
k5test is only supposed to require Python 2.4, but cross_realms uses itertools.permutations which is new in 2.6. Use a list display instead. ticket: 7054 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25592 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/util/k5test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/k5test.py b/src/util/k5test.py
index 0e7c30b62..60c19acb2 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -314,7 +314,6 @@ command-line flags. These are documented in the --help output.
"""
import atexit
-import itertools
import optparse
import os
import shlex
@@ -979,7 +978,8 @@ def cross_realms(num, xtgts=None, args=None, **keywords):
if xtgts is None:
# Default to cross tgts for every pair of realms.
- xtgts = frozenset(itertools.permutations(range(num), 2))
+ # (itertools.permutations would work here but is new in 2.6.)
+ xtgts = [(x,y) for x in range(num) for y in range(num) if x != y]
# Create the realms.
realms = []