Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Jul 4, 2015
1 parent 6aa2ad1 commit f72b2a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tornadis/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_client_nowait(self):
A Client instance (not necessary connected) as result (or None).
"""
if self.__sem is not None:
if self.__sem.locked():
if self.__sem._value == 0:
return None
self.__sem.acquire()
_, client = self._get_client_from_pool_or_make_it()
Expand Down
2 changes: 1 addition & 1 deletion tornadis/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def pubsub_pop_message(self, deadline=None):
try:
reply = self._reply_list.pop(0)
except IndexError:
yield self._condition.wait(deadline=deadline)
yield self._condition.wait(timeout=deadline)
else:
if reply is None:
try:
Expand Down

0 comments on commit f72b2a7

Please sign in to comment.