]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_util.py: remove use of 'a if p else b' syntax that requires Python 2.5.
authordavid-sarah <david-sarah@jacaranda.org>
Fri, 6 Aug 2010 04:16:16 +0000 (21:16 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Fri, 6 Aug 2010 04:16:16 +0000 (21:16 -0700)
src/allmydata/test/test_util.py

index 0b7b24f212bb4ef17a6b0bbc49615c84409643c2..6b687808b02112aeb10affd1cd993b1d2a02f8e2 100644 (file)
@@ -2035,9 +2035,7 @@ class StringSpans(unittest.TestCase):
             return ds
         def dump(s):
             p = set(s._dump())
-            # wow, this is the first time I've ever wanted ?: in python
-            # note: this requires python2.5
-            d = "".join([(S[i] if i in p else " ") for i in range(l)])
+            d = "".join([((i not in p) and " " or S[i]) for i in range(l)])
             assert len(d) == l
             return d
         DEBUG = False