Use byte literals instead of encode (#33633)
This commit is contained in:
1 parent
39a01fcdc6
commit
d85222ad80
4 files changed
+7
-7
No files matched your search
@@ -98,9 +98,9 @@ class ThomsonDeviceScanner(DeviceScanner):
|
||||
telnet.read_until(b"Password : ")
|
||||
telnet.write((self.password + "\r\n").encode("ascii"))
|
||||
telnet.read_until(b"=>")
|
||||
telnet.write(("hostmgr list\r\n").encode("ascii"))
|
||||
telnet.write(b"hostmgr list\r\n")
|
||||
devices_result = telnet.read_until(b"=>").split(b"\r\n")
|
||||
telnet.write("exit\r\n".encode("ascii"))
|
||||
telnet.write(b"exit\r\n")
|
||||
except EOFError:
|
||||
_LOGGER.exception("Unexpected response from router")
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user