projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fc6ab1
)
test_util.py: remove use of 'a if p else b' syntax that requires Python 2.5.
author
david-sarah
<david-sarah@jacaranda.org>
Fri, 6 Aug 2010 04:16:16 +0000
(21:16 -0700)
committer
david-sarah
<david-sarah@jacaranda.org>
Fri, 6 Aug 2010 04:16:16 +0000
(21:16 -0700)
src/allmydata/test/test_util.py
patch
|
blob
|
history
diff --git
a/src/allmydata/test/test_util.py
b/src/allmydata/test/test_util.py
index 0b7b24f212bb4ef17a6b0bbc49615c84409643c2..6b687808b02112aeb10affd1cd993b1d2a02f8e2 100644
(file)
--- a/
src/allmydata/test/test_util.py
+++ b/
src/allmydata/test/test_util.py
@@
-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