Repository: cassandra
Updated Branches:
  refs/heads/trunk 04fa64574 -> e43fbe0a7


Make cqlsh support python-2.6 (FOLLOW-UP CASSANDRA-10415)

patch by Stefania Alborghetti; reviewed by Benjamin Lerer for CASSANDRA-10415


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

Branch: refs/heads/trunk
Commit: 5a1d376489e5884b381e3bee3afd22130945782d
Parents: 29ff1f2
Author: Stefania Alborghetti <stefania.alborghe...@datastax.com>
Authored: Thu Oct 22 10:12:04 2015 +0200
Committer: blerer <benjamin.le...@datastax.com>
Committed: Thu Oct 22 10:17:17 2015 +0200

----------------------------------------------------------------------
 pylib/cqlshlib/cqlhandling.py                | 2 +-
 pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/pylib/cqlshlib/cqlhandling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cqlhandling.py b/pylib/cqlshlib/cqlhandling.py
index 9ea30cd..6ee3cf5 100644
--- a/pylib/cqlshlib/cqlhandling.py
+++ b/pylib/cqlshlib/cqlhandling.py
@@ -63,7 +63,7 @@ class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
         We cannot let resreved cql keywords be simple 'identifier' since this 
caused
         problems with completion, see CASSANDRA-10415
         """
-        syntax = '<reserved_identifier> ::= /(' + '|'.join(r'\b{}\b'.format(k) 
for k in keywords) + ')/ ;'
+        syntax = '<reserved_identifier> ::= /(' + '|'.join(r'\b%s\b' % (k,) 
for k in keywords) + ')/ ;'
         self.append_rules(syntax)
 
     def completer_for(self, rulename, symname):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/pylib/cqlshlib/test/test_cqlsh_completion.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py 
b/pylib/cqlshlib/test/test_cqlsh_completion.py
index 5f7b6e4..04cee5d 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -76,7 +76,7 @@ class CqlshCompletionCase(BaseTestCase):
             # ensure the last line of the completion is the prompt
             prompt_regex = self.cqlsh.prompt.lstrip() + re.escape(inputstring)
             msg = ('Double-tab completion '
-                   'does not print prompt for input "{}"'.format(inputstring))
+                   'does not print prompt for input "%s"' % (inputstring, ))
             self.assertRegexpMatches(choice_lines[-1], prompt_regex, msg=msg)
 
         choice_lines = [line.strip() for line in choice_lines[:-1]]

Reply via email to