Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set keyspace on conn after (potentially) logging in

Authenticators may require that users be logged in prior to
executing set_keyspace() now in order to avoid leaking info
about what keyspaces exist.
  • Loading branch information...
commit fb2c04a134dae435b06373d0ab09b59fd6c297a9 1 parent 7d6a6ee
@thobbs thobbs authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 pycassa/connection.py
View
4 pycassa/connection.py
@@ -50,12 +50,12 @@ def __init__(self, keyspace, server, framed_transport=True, timeout=None,
Cassandra.Client.__init__(self, protocol)
self.transport.open()
- self.set_keyspace(keyspace)
-
if credentials is not None:
request = AuthenticationRequest(credentials=credentials)
self.login(request)
+ self.set_keyspace(keyspace)
+
def set_keyspace(self, keyspace):
if keyspace != self.keyspace:
Cassandra.Client.set_keyspace(self, keyspace)
Please sign in to comment.
Something went wrong with that request. Please try again.