ui: flush stdout before writing traceback to stderr

Sometimes a traceback message is paired with ui.debug(). This patch makes sure
that these messages are displayed in the right order.
This commit is contained in:
Yuya Nishihara 2015-05-31 14:40:28 +09:00
parent 0bfa24333c
commit 398221202a

View File

@ -867,6 +867,7 @@ class ui(object):
''.join(causetb),
''.join(exconly))
else:
self.flush() # flush debug or status message
traceback.print_exception(exc[0], exc[1], exc[2],
file=self.ferr)
return self.tracebackflag or force