Skip to content

Commit

Permalink
Use list() only where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Nov 1, 2017
1 parent 6352e86 commit 0dbf8c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rclpy/rclpy/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ def wait_for_ready_callbacks(self, timeout_sec=None, nodes=None):
services.extend(node.services)
guards.extend(node.guards)

subscriptions = [e for e in filter(self._can_execute, subscriptions)]
guards = [e for e in filter(self._can_execute, guards)]
timers = [e for e in filter(self._can_execute, timers)]
clients = [e for e in filter(self._can_execute, clients)]
services = [e for e in filter(self._can_execute, services)]
subscriptions = filter(self._can_execute, subscriptions)
guards = list(filter(self._can_execute, guards))
timers = list(filter(self._can_execute, timers))
clients = filter(self._can_execute, clients)
services = filter(self._can_execute, services)

# retrigger a guard condition that was triggered but not handled
for gc in guards:
Expand Down

0 comments on commit 0dbf8c7

Please sign in to comment.