1
0
Fork 0
mirror of https://github.com/de2tla2f/pymaster.git synced 2024-11-25 12:21:28 +00:00

Fix TypeError in sendto call

This commit is contained in:
Alibek Omarov (a1batross) 2017-06-10 22:04:53 +03:00
parent fff6fc9332
commit d99acdb25b

View file

@ -111,8 +111,10 @@ class PyMaster:
continue continue
if( nat ): if( nat ):
reply = '\xff\xff\xff\xffc {0}:{1}'.format( addr[0], addr[1] )
data = reply.encode( 'latin_1' )
# Tell server to send info reply # Tell server to send info reply
self.sock.sendto( '\xff\xff\xff\xffc {0}:{1}'.format( addr[0], addr[1] ), i.addr ) self.sock.sendto( data, i.addr )
# Use pregenerated address string # Use pregenerated address string
packet += i.queryAddr packet += i.queryAddr