Skip to content

Commit

Permalink
destination iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
darbula committed Apr 7, 2016
1 parent bd41504 commit 6b02074
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymote/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pymote.sensor import CompositeSensor
from pymote.conf import settings
import logging
import collections


class Node(object):
Expand Down Expand Up @@ -42,7 +43,7 @@ def send(self, message):
"""
message.source = self
message.destination = isinstance(message.destination, list) and\
message.destination = isinstance(message.destination, collections.Iterable) and \
message.destination or [message.destination]
for destination in message.destination:
logger.debug('Node %d sent message %s.' %
Expand Down

0 comments on commit 6b02074

Please sign in to comment.