Skip to content

Commit

Permalink
remove expression that always evaluates to True
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Oct 18, 2017
1 parent 385b18b commit 6c77285
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rclpy/rclpy/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ def wait(self, timeout_sec=None):
if timeout_sec is not None and timeout_sec < 0:
timeout_sec = None
# Wait for all work to complete
if timeout_sec is None or timeout_sec >= 0:
with self._work_condition:
if not self._work_condition.wait_for(
lambda: self._num_work_executing == 0, timeout_sec):
return False
with self._work_condition:
if not self._work_condition.wait_for(
lambda: self._num_work_executing == 0, timeout_sec):
return False
return True


Expand Down

0 comments on commit 6c77285

Please sign in to comment.