Internet: Fix Python 3 compatibility.

This commit is contained in:
Valentin Lorentz 2013-01-06 16:58:02 +01:00
parent 418b3e007c
commit 8a8f380a6b
1 changed files with 2 additions and 2 deletions

View File

@ -87,11 +87,11 @@ class Internet(callbacks.Plugin):
return return
sock.settimeout(5) sock.settimeout(5)
if usertld == 'com': if usertld == 'com':
sock.send('=') sock.send(b'=')
sock.send(domain.encode('ascii')) sock.send(domain.encode('ascii'))
sock.send(b'\r\n') sock.send(b'\r\n')
s = '' s = b''
end_time = time.time() + 5 end_time = time.time() + 5
try: try:
while end_time>time.time(): while end_time>time.time():