Skip to content
This repository was archived by the owner on Dec 27, 2019. It is now read-only.

Commit fc27659

Browse files
committed
Merge branch 'hotfix/0.7.1'
2 parents 9ffcf38 + 08355df commit fc27659

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/support/drivers/Extron.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ def __send_command(self, command: str) -> None:
7979
else:
8080
# Open a network connection and send the command.
8181
with socket.create_connection((self.host, 23)) as connection:
82-
with connection.makefile(mode='wb') as stream: # type: io.BufferedWriter
82+
with connection.makefile(mode='rwb') as stream: # type: io.BufferedWriter
83+
# Read the log-in message, there may be an empty line before it.
84+
while len(stream.readline().rstrip(b'\r\n')) == 0:
85+
pass
86+
stream.readline()
87+
# Write the command.
8388
stream.write(command.encode())
8489
stream.flush()
90+
# Read the video, then audio result.
91+
stream.readline()
92+
stream.readline()

0 commit comments

Comments
 (0)