Updated Branches: refs/heads/trunk 5577ff626 -> 7ddb5c7a4
cqlsh: handle fully qualified class names Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-4546 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ddb5c7a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ddb5c7a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ddb5c7a Branch: refs/heads/trunk Commit: 7ddb5c7a477361f1a1dd7e4b7e9613b921e50b5b Parents: 5577ff6 Author: Brandon Williams <[email protected]> Authored: Thu Aug 16 17:26:24 2012 -0500 Committer: Brandon Williams <[email protected]> Committed: Thu Aug 16 17:26:24 2012 -0500 ---------------------------------------------------------------------- bin/cqlsh | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ddb5c7a/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 6b61364..7ea0128 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -457,6 +457,7 @@ def unix_time_from_uuid1(u): def format_value(val, casstype, output_encoding, addcolor=False, time_format='', float_precision=3, colormap=DEFAULT_VALUE_COLORS, nullval='null'): + casstype = trim_if_present(casstype, 'org.apache.cassandra.db.marshal.') color = colormap['default'] coloredval = None displaywidth = None @@ -498,6 +499,7 @@ def format_value(val, casstype, output_encoding, addcolor=False, time_format='', color = colormap['hex'] else: # AsciiType is the only other one known right now, but handle others + val = str(val) escapedval = val.replace('\\', '\\\\') bval = controlchars_re.sub(_show_control_chars, escapedval) if addcolor: @@ -775,8 +777,8 @@ class Shell(cmd.Cmd): def get_keyspace(self, ksname): try: return self.make_hacktastic_thrift_call('describe_keyspace', ksname) - except cql.cassandra.ttypes.NotFoundException, e: - raise KeyspaceNotFound('Keyspace %s not found.' % e) + except cql.cassandra.ttypes.NotFoundException: + raise KeyspaceNotFound('Keyspace %r not found.' % ksname) def get_keyspaces(self): return self.make_hacktastic_thrift_call('describe_keyspaces')
