Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Specify superclass explicitly, don't use super()

Fixes #122
  • Loading branch information...
commit 9348040fed6b370347f543b0bcb7dc1d0c1355a2 1 parent c14922d
Tyler Hobbs thobbs authored
Showing with 7 additions and 12 deletions.
  1. +4 −9 pycassa/batch.py
  2. +2 −2 pycassa/connection.py
  3. +1 −1  pycassa/pool.py
13 pycassa/batch.py
View
@@ -182,19 +182,14 @@ def __init__(self, column_family, queue_size=100, write_consistency_level=None,
that all operations will be executed on.
"""
wcl = write_consistency_level or column_family.write_consistency_level
- super(CfMutator, self).__init__(column_family.pool, queue_size=queue_size,
- allow_retries=allow_retries,
- write_consistency_level=wcl)
+ Mutator.__init__(self, column_family.pool, queue_size, wcl, allow_retries)
self._column_family = column_family
def insert(self, key, cols, timestamp=None, ttl=None):
""" Adds a single row insert to the batch. """
- return super(CfMutator, self).insert(self._column_family, key, cols,
- timestamp=timestamp, ttl=ttl)
+ return Mutator.insert(self, self._column_family, key, cols, timestamp, ttl)
def remove(self, key, columns=None, super_column=None, timestamp=None):
""" Adds a single row remove to the batch. """
- return super(CfMutator, self).remove(self._column_family, key,
- columns=columns,
- super_column=super_column,
- timestamp=timestamp)
+ return Mutator.remove(self, self._column_family, key,
+ columns, super_column, timestamp)
4 pycassa/connection.py
View
@@ -35,7 +35,7 @@ def __init__(self, keyspace, server, framed_transport=True, timeout=None,
else:
self.transport = TTransport.TBufferedTransport(socket)
protocol = TBinaryProtocol.TBinaryProtocolAccelerated(self.transport)
- super(Connection, self).__init__(protocol)
+ Cassandra.Client.__init__(self, protocol)
self.transport.open()
if api_version is None:
@@ -61,7 +61,7 @@ def __init__(self, keyspace, server, framed_transport=True, timeout=None,
def set_keyspace(self, keyspace):
if keyspace != self.keyspace:
- super(Connection, self).set_keyspace(keyspace)
+ Cassandra.Client.set_keyspace(self, keyspace)
self.keyspace = keyspace
def close(self):
2  pycassa/pool.py
View
@@ -44,7 +44,7 @@ def __init__(self, pool, max_retries, *args, **kwargs):
self.starttime = time.time()
self.operation_count = 0
self._state = ConnectionWrapper._CHECKED_OUT
- super(ConnectionWrapper, self).__init__(*args, **kwargs)
+ Connection.__init__(self, *args, **kwargs)
self._pool._notify_on_connect(self)
# For testing purposes only
Please sign in to comment.
Something went wrong with that request. Please try again.