bugfix
This commit is contained in:
parent
8d40711904
commit
ce3c42dca9
@ -48,11 +48,15 @@ class UdpComm:
|
||||
|
||||
def send(self,data,addr):
|
||||
b = json.dumps(data).encode('utf-8')
|
||||
if isinstance(addr):
|
||||
addr = tuple(addr)
|
||||
self.udpSerSock.sendto(b,addr)
|
||||
|
||||
def sends(self,data, addrs):
|
||||
b = json.dumps(data).encode('utf-8')
|
||||
for addr in addrs:
|
||||
if isinstance(addr):
|
||||
addr = tuple(addr)
|
||||
self.udpSerSock.sendto(b,addr)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user