diff options
author | Przemyslaw Gorszkowski <przemek.gorszkowski@redembedded.com> | 2021-04-26 09:32:37 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-01 22:50:59 +0100 |
commit | 3f7b9c1b429a4c68240e80832a8ef93ee210e5ff (patch) | |
tree | c6e268c5a125c53b65db26c6d8d50e0a89e92dba | |
parent | d892287b31f81b075983ba500be265f75b53df64 (diff) | |
download | bitbake-contrib-3f7b9c1b429a4c68240e80832a8ef93ee210e5ff.tar.gz |
progress: LineFilterProgressHandler - Handle parsing line which ends with CR only
S3 commands need to handle different CR only line endings, update the handler
to cope with this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/progress.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/progress.py b/lib/bb/progress.py index d051ba019..52d704d64 100644 --- a/lib/bb/progress.py +++ b/lib/bb/progress.py @@ -94,12 +94,15 @@ class LineFilterProgressHandler(ProgressHandler): while True: breakpos = self._linebuffer.find('\n') + 1 if breakpos == 0: - break + # for the case when the line with progress ends with only '\r' + breakpos = self._linebuffer.find('\r') + 1 + if breakpos == 0: + break line = self._linebuffer[:breakpos] self._linebuffer = self._linebuffer[breakpos:] # Drop any line feeds and anything that precedes them lbreakpos = line.rfind('\r') + 1 - if lbreakpos: + if lbreakpos and lbreakpos != breakpos: line = line[lbreakpos:] if self.writeline(filter_color(line)): super().write(line) |