Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Specify superclass explicitly, don't use super()

Fixes #122
  • Loading branch information...
commit 9348040fed6b370347f543b0bcb7dc1d0c1355a2 1 parent c14922d
Tyler Hobbs thobbs authored
13 pycassa/batch.py
@@ -182,19 +182,14 @@ def __init__(self, column_family, queue_size=100, write_consistency_level=None,
182 182 that all operations will be executed on.
183 183 """
184 184 wcl = write_consistency_level or column_family.write_consistency_level
185   - super(CfMutator, self).__init__(column_family.pool, queue_size=queue_size,
186   - allow_retries=allow_retries,
187   - write_consistency_level=wcl)
  185 + Mutator.__init__(self, column_family.pool, queue_size, wcl, allow_retries)
188 186 self._column_family = column_family
189 187
190 188 def insert(self, key, cols, timestamp=None, ttl=None):
191 189 """ Adds a single row insert to the batch. """
192   - return super(CfMutator, self).insert(self._column_family, key, cols,
193   - timestamp=timestamp, ttl=ttl)
  190 + return Mutator.insert(self, self._column_family, key, cols, timestamp, ttl)
194 191
195 192 def remove(self, key, columns=None, super_column=None, timestamp=None):
196 193 """ Adds a single row remove to the batch. """
197   - return super(CfMutator, self).remove(self._column_family, key,
198   - columns=columns,
199   - super_column=super_column,
200   - timestamp=timestamp)
  194 + return Mutator.remove(self, self._column_family, key,
  195 + columns, super_column, timestamp)
4 pycassa/connection.py
@@ -35,7 +35,7 @@ def __init__(self, keyspace, server, framed_transport=True, timeout=None,
35 35 else:
36 36 self.transport = TTransport.TBufferedTransport(socket)
37 37 protocol = TBinaryProtocol.TBinaryProtocolAccelerated(self.transport)
38   - super(Connection, self).__init__(protocol)
  38 + Cassandra.Client.__init__(self, protocol)
39 39 self.transport.open()
40 40
41 41 if api_version is None:
@@ -61,7 +61,7 @@ def __init__(self, keyspace, server, framed_transport=True, timeout=None,
61 61
62 62 def set_keyspace(self, keyspace):
63 63 if keyspace != self.keyspace:
64   - super(Connection, self).set_keyspace(keyspace)
  64 + Cassandra.Client.set_keyspace(self, keyspace)
65 65 self.keyspace = keyspace
66 66
67 67 def close(self):
2  pycassa/pool.py
@@ -44,7 +44,7 @@ def __init__(self, pool, max_retries, *args, **kwargs):
44 44 self.starttime = time.time()
45 45 self.operation_count = 0
46 46 self._state = ConnectionWrapper._CHECKED_OUT
47   - super(ConnectionWrapper, self).__init__(*args, **kwargs)
  47 + Connection.__init__(self, *args, **kwargs)
48 48 self._pool._notify_on_connect(self)
49 49
50 50 # For testing purposes only

0 comments on commit 9348040

Please sign in to comment.
Something went wrong with that request. Please try again.