diff --git a/CHANGES.txt b/CHANGES.txt index 27e7d998f2..7c7290f133 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.1.2 + * Fix COPY ... TO STDOUT behavior in cqlsh (CASSANDRA-18353) * Remove six and Py2SaferScanner merge cruft (CASSANDRA-18354) diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py index 31c881c595..2a8a11d1bf 100644 --- a/pylib/cqlshlib/copyutil.py +++ b/pylib/cqlshlib/copyutil.py @@ -86,6 +86,11 @@ def printmsg(msg, eol='\n'): sys.stdout.flush() +# Keep arguments in sync with printmsg +def swallowmsg(msg, eol='\n'): + None + + class OneWayPipe(object): """ A one way pipe protected by two process level locks, one for reading and one for writing. @@ -249,7 +254,7 @@ class CopyTask(object): DEBUG = True # do not display messages when exporting to STDOUT unless --debug is set - self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else None + self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else swallowmsg self.options = self.parse_options(opts, direction) self.num_processes = self.options.copy['numprocesses']