Fix sending unicode string when expecting ascii (binary) data

This commit is contained in:
Ken Roberts 2016-02-28 04:35:15 -08:00
parent 9774618d37
commit 7c23941f35

View File

@ -515,7 +515,7 @@ class PJLink1(QTcpSocket):
self.socket_timer.start() self.socket_timer.start()
try: try:
self.projectorNetwork.emit(S_NETWORK_SENDING) self.projectorNetwork.emit(S_NETWORK_SENDING)
sent = self.write(out) sent = self.write(out.encode('ascii'))
self.waitForBytesWritten(2000) # 2 seconds should be enough self.waitForBytesWritten(2000) # 2 seconds should be enough
if sent == -1: if sent == -1:
# Network error? # Network error?