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