ttfw: full_stdout should not return data after pattern in expect

pull/7325/head
He Yin Ling 2021-07-01 17:43:50 +08:00 zatwierdzone przez bot
rodzic 4502a6a5ae
commit b79778d273
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -604,6 +604,7 @@ class BaseDUT(object):
while True:
ret, index = method(data, pattern)
if ret is not None:
stdout = data[:index]
self.data_cache.flush(index)
break
time_remaining = start_time + timeout - time.time()
@ -611,7 +612,6 @@ class BaseDUT(object):
break
# wait for new data from cache
data = self.data_cache.get_data(time_remaining)
stdout = data
if ret is None:
pattern = _pattern_to_string(pattern)