From d99acdb25b230c27301c68ab7bd5a314660807ff Mon Sep 17 00:00:00 2001 From: "Alibek Omarov (a1batross)" Date: Sat, 10 Jun 2017 22:04:53 +0300 Subject: [PATCH] Fix TypeError in sendto call --- pymaster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pymaster.py b/pymaster.py index f37d914..6bbb90e 100755 --- a/pymaster.py +++ b/pymaster.py @@ -111,8 +111,10 @@ class PyMaster: continue 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 - 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 packet += i.queryAddr