mirror of https://github.com/apache/cassandra
cqlsh: flush capture output after every command.
Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4073
This commit is contained in:
parent
5a63858d0d
commit
751e58d1e7
|
|
@ -1051,6 +1051,7 @@ class Shell(cmd.Cmd):
|
|||
self.print_count_result(self.cursor)
|
||||
elif self.cursor.description is not _VOID_DESCRIPTION:
|
||||
self.print_result(self.cursor)
|
||||
self.flush_output()
|
||||
return True
|
||||
|
||||
# these next two functions are not guaranteed perfect; just checks if the
|
||||
|
|
@ -2539,6 +2540,9 @@ class Shell(cmd.Cmd):
|
|||
out = self.query_out
|
||||
out.write(self.applycolor(str(text), color) + ('\n' if newline else ''))
|
||||
|
||||
def flush_output(self):
|
||||
self.query_out.flush()
|
||||
|
||||
def printerr(self, text, color=RED, newline=True, shownum=None):
|
||||
if shownum is None:
|
||||
shownum = self.show_line_nums
|
||||
|
|
|
|||
Loading…
Reference in New Issue