Skip to content

Commit 2e2bb75

Browse files
author
Justin Patrin
committed
Python 2.4 doesn't have ternary ifs :-(
1 parent 4cac2ee commit 2e2bb75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test_pooling_base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,11 @@ def alive(self):
9494

9595
def join(self):
9696
self.thread.join(5)
97-
assert not self.alive, ("Greenlet timeout" if self.use_greenlets
98-
else "Thread timeout")
97+
if self.use_greenlets:
98+
msg = "Greenlet timeout"
99+
else:
100+
msg = "Thread timeout"
101+
assert not self.alive, msg
99102
self.thread = None
100103

101104
def run(self):

0 commit comments

Comments
 (0)