diff --git a/labgrid/driver/smallubootdriver.py b/labgrid/driver/smallubootdriver.py index 98327ab53..7913e498b 100644 --- a/labgrid/driver/smallubootdriver.py +++ b/labgrid/driver/smallubootdriver.py @@ -96,7 +96,10 @@ def _run(self, cmd: str, *, timeout: int = 30, codec: str = "utf-8", decodeerror cmp_command = f"echo{marker}; {cmd}; echo{marker}" self.console.sendline(cmp_command) - _, before, _, _ = self.console.expect(self.prompt, timeout=timeout) + while True: + _, before, _, _ = self.console.expect(self.prompt, timeout=timeout) + if len(before) > 4: + break data = re_vt100.sub( '', before.decode('utf-8'), count=1000000