diff --git a/CHANGES.txt b/CHANGES.txt index 00b5933aad..be048ff248 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -123,6 +123,7 @@ * Rename DisableFlag class to EnableFlag on guardrails (CASSANDRA-17544) 4.1.2 + * Fix COPY ... TO STDOUT behavior in cqlsh (CASSANDRA-18353) * Remove six and Py2SaferScanner merge cruft (CASSANDRA-18354) 4.1.1 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']