[26252] in CVS-changelog-for-Kerberos-V5
svn rev #25592: trunk/src/util/
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Sat Dec 17 00:01:37 2011
Date: Sat, 17 Dec 2011 00:01:33 -0500
From: ghudson@mit.edu
Message-Id: <201112170501.pBH51Xj1030843@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
http://src.mit.edu/fisheye/changelog/krb5/?cs=25592
Commit By: ghudson
Log Message:
ticket: 7054
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.
Changed Files:
U trunk/src/util/k5test.py
Modified: trunk/src/util/k5test.py
===================================================================
--- trunk/src/util/k5test.py 2011-12-16 23:19:01 UTC (rev 25591)
+++ trunk/src/util/k5test.py 2011-12-17 05:01:32 UTC (rev 25592)
@@ -314,7 +314,6 @@
"""
import atexit
-import itertools
import optparse
import os
import shlex
@@ -979,7 +978,8 @@
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 = []
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5