зеркало из https://github.com/mozilla/gecko-dev.git
Bug 884028 - Acquire lock before writing to terminal; r=ted
DONTBUILD (NPOTB) --HG-- extra : rebase_source : 373c1fa5e47a2493970da0412788c55b9bdd9ef8
This commit is contained in:
Родитель
c01728024c
Коммит
3e48e57775
|
@ -66,17 +66,22 @@ class TerminalLoggingHandler(logging.Handler):
|
|||
def emit(self, record):
|
||||
msg = self.format(record)
|
||||
|
||||
if self.footer:
|
||||
self.footer.clear()
|
||||
self.acquire()
|
||||
|
||||
self.fh.write(msg)
|
||||
self.fh.write('\n')
|
||||
try:
|
||||
if self.footer:
|
||||
self.footer.clear()
|
||||
|
||||
if self.footer:
|
||||
self.footer.draw()
|
||||
self.fh.write(msg)
|
||||
self.fh.write('\n')
|
||||
|
||||
# If we don't flush, the footer may not get drawn.
|
||||
self.flush()
|
||||
if self.footer:
|
||||
self.footer.draw()
|
||||
|
||||
# If we don't flush, the footer may not get drawn.
|
||||
self.fh.flush()
|
||||
finally:
|
||||
self.release()
|
||||
|
||||
|
||||
class BuildProgressFooter(object):
|
||||
|
|
Загрузка…
Ссылка в новой задаче