You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2012/09/13 21:22:45 UTC

[4/4] git commit: cqlsh: flush capture output after every command. Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4073

cqlsh: flush capture output after every command.
Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4073


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/751e58d1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/751e58d1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/751e58d1

Branch: refs/heads/cassandra-1.1
Commit: 751e58d1e7ae4094d31d7b0122c2800066f36399
Parents: 5a63858
Author: Brandon Williams <br...@apache.org>
Authored: Thu Sep 13 14:05:11 2012 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Sep 13 14:05:11 2012 -0500

----------------------------------------------------------------------
 bin/cqlsh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/751e58d1/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 30e6505..b2a11e3 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -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