test.expect(): Use Connection.Flags.ReadOnlyPrintable

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2023-02-23 14:51:54 +01:00
commit 069e1dee1a

View file

@ -25,7 +25,7 @@ async def expect(conn, cmd=None, regex=None, subject=None, act_timeout=0.1, tota
if subject == None: if subject == None:
subject = ">" + regex + "<" subject = ">" + regex + "<"
while True: while True:
flags = Connection.Flags.ReadStripNewline|Connection.Flags.ReadDecodeToString flags = Connection.Flags.ReadStripNewline|Connection.Flags.ReadDecodeToString|Connection.Flags.ReadOnlyPrintable
timeout = act_timeout timeout = act_timeout
now = time.time() now = time.time()
if deadline is not None: if deadline is not None: