always flush formatter after calling a command
This commit is contained in:
parent
ab15088189
commit
18dd9e2b8f
2 changed files with 16 additions and 10 deletions
|
|
@ -77,6 +77,9 @@ class TableFormatter(IFormatter):
|
|||
s += table.get_html_string()
|
||||
else:
|
||||
s += table.get_string()
|
||||
|
||||
self.queue = []
|
||||
|
||||
if self.return_only:
|
||||
return s
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
formatter_name = self.DEFAULT_FORMATTER
|
||||
self.set_formatter(formatter_name)
|
||||
|
||||
try:
|
||||
try:
|
||||
return super(ReplApplication, self).onecmd(line)
|
||||
except CallErrors, e:
|
||||
|
|
@ -313,6 +314,8 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
except (KeyboardInterrupt, EOFError):
|
||||
# ^C during a command process doesn't exit application.
|
||||
print '\nAborted.'
|
||||
finally:
|
||||
self.flush()
|
||||
|
||||
def emptyline(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue