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/02/06 22:08:05 UTC

[7/8] git commit: Fix cqlsh data display on python <2.7 Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-3846

Fix cqlsh data display on python <2.7
Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-3846


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

Branch: refs/heads/trunk
Commit: b527d9ffe1807f6ae1b1df15d64d1715bb33f4f1
Parents: a35f878
Author: paul cannon <pa...@datastax.com>
Authored: Mon Feb 6 13:32:03 2012 -0600
Committer: Brandon Williams <br...@apache.org>
Committed: Mon Feb 6 13:32:03 2012 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b527d9ff/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 1ef7f3b..c89aa16 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -276,7 +276,7 @@ def format_value(val, casstype, output_encoding, addcolor=False, time_format='',
     elif casstype == 'UTF8Type':
         escapedval = val.replace(u'\\', u'\\\\')
         escapedval = controlchars_re.sub(_show_control_chars, escapedval)
-        bval = escapedval.encode(output_encoding, errors='backslashreplace')
+        bval = escapedval.encode(output_encoding, 'backslashreplace')
         displaywidth = wcwidth.wcswidth(bval.decode(output_encoding))
         if addcolor:
             coloredval = YELLOW + bits_to_turn_red_re.sub(_turn_bits_red, bval) + ANSI_RESET