Ensure wait_for_line() is not called with timeout=0
(cherry picked from commit 1770b37095)
This commit is contained in:
committed by
Michal Nowak
parent
93b4b110a7
commit
b09835a5d1
@@ -227,6 +227,7 @@ class WatchLog(abc.ABC):
|
||||
if not self._fd:
|
||||
raise WatchLogException("No file to watch")
|
||||
leftover = ""
|
||||
assert timeout, "Do not use this class unless you want to WAIT for something."
|
||||
deadline = time.time() + timeout
|
||||
while time.time() < deadline:
|
||||
for line in self._fd.readlines():
|
||||
|
||||
Reference in New Issue
Block a user