more pypo fixes

This commit is contained in:
Kyle Robbertze 2020-01-23 12:37:49 +02:00
parent 44a0cb50e1
commit 6ebb1fd555
14 changed files with 132 additions and 131 deletions

View file

@ -155,11 +155,11 @@ def liquidsoap_get_info(telnet_lock, host, port, logger):
telnet_lock.acquire()
tn = telnetlib.Telnet(host, port)
msg = "version\n"
tn.write(msg)
tn.write("exit\n")
response = tn.read_all()
tn.write(msg.encode("utf-8"))
tn.write("exit\n".encode("utf-8"))
response = tn.read_all().decode("utf-8")
except Exception as e:
logger.error(str(e))
logger.error(e)
return None
finally:
telnet_lock.release()