Commit 66cd62e9 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove trailing whitespaces.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1530 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent face448b
......@@ -75,7 +75,7 @@ class IdentificationHandler(MasterHandler):
conn.setUUID(uuid)
conn.setHandler(handler)
# answer
args = (NodeTypes.MASTER, app.uuid, app.pt.getPartitions(),
args = (NodeTypes.MASTER, app.uuid, app.pt.getPartitions(),
app.pt.getReplicas(), uuid)
conn.answer(Packets.AcceptIdentification(*args), packet.getId())
# trigger the event
......
......@@ -43,7 +43,7 @@ class StorageServiceHandler(BaseServiceHandler):
def askLastIDs(self, conn, packet):
app = self.app
conn.answer(Packets.AnswerLastIDs(app.loid, app.tm.getLastTID(),
conn.answer(Packets.AnswerLastIDs(app.loid, app.tm.getLastTID(),
app.pt.getID()), packet.getId())
def askUnfinishedTransactions(self, conn, packet):
......@@ -62,7 +62,7 @@ class StorageServiceHandler(BaseServiceHandler):
# transaction locked on this storage node
t = self.app.tm[tid]
if not t.lock(uuid):
if not t.lock(uuid):
return
# all nodes are locked
......
......@@ -59,7 +59,7 @@ class Transaction(object):
"""
Returns the list of OIDs used in the transaction
"""
return list(self._oid_list)
def prepare(self, oid_list, uuid_list, msg_id):
......@@ -88,7 +88,7 @@ class Transaction(object):
class TransactionManager(object):
"""
"""
Manage current transactions
"""
......@@ -157,7 +157,7 @@ class TransactionManager(object):
self._node_dict = {}
def hasPending(self):
"""
"""
Returns True if some transactions are pending
"""
return bool(self._tid_dict)
......
......@@ -58,7 +58,7 @@ class IdentificationHandler(BaseStorageHandler):
conn.setHandler(handler)
conn.setUUID(uuid)
node.setUUID(uuid)
args = (NodeTypes.STORAGE, app.uuid, app.pt.getPartitions(),
args = (NodeTypes.STORAGE, app.uuid, app.pt.getPartitions(),
app.pt.getReplicas(), uuid)
# accept the identification and trigger an event
conn.answer(Packets.AcceptIdentification(*args), packet.getId())
......
......@@ -49,9 +49,9 @@ class ClientTests(NEOFunctionalTest):
def setUp(self):
NEOFunctionalTest.setUp(self)
self.neo = NEOCluster(
['test_neo1'],
['test_neo1'],
port_base=20000,
master_node_count=1,
master_node_count=1,
temp_dir=self.getTempDirectory()
)
......
......@@ -617,8 +617,8 @@ class MasterServerElectionTests(NeoTestBase):
""" Check with a non-master node, must be refused """
conn = self.__getClient()
packet = protocol.RequestIdentification(
NodeTypes.CLIENT,
conn.getUUID(),
NodeTypes.CLIENT,
conn.getUUID(),
conn.getAddress(),
name=self.app.name,
)
......@@ -632,7 +632,7 @@ class MasterServerElectionTests(NeoTestBase):
name=self.app.name
)
def testRequestIdentification2(self):
def testRequestIdentification2(self):
""" Check with an unknown master node """
conn = self.__getMaster(register=False)
packet = protocol.RequestIdentification(
......
......@@ -157,7 +157,7 @@ class MasterRecoveryTests(NeoTestBase):
offset = 1000000
self.assertFalse(self.app.pt.hasOffset(offset))
cell_list = [(offset, ((uuid, NodeStates.DOWN,),),)]
self.checkProtocolErrorRaised(recovery.answerPartitionTable, conn,
self.checkProtocolErrorRaised(recovery.answerPartitionTable, conn,
packet, None, cell_list)
......
......@@ -53,9 +53,9 @@ class MasterStorageHandlerTests(NeoTestBase):
return self.port
def _getClient(self):
return self.identifyToMasterNode(node_type=NodeTypes.CLIENT,
return self.identifyToMasterNode(node_type=NodeTypes.CLIENT,
ip='127.0.0.1', port=self._allocatePort())
def _getStorage(self):
return self.identifyToMasterNode(node_type=NodeTypes.STORAGE,
ip='127.0.0.1', port=self._allocatePort())
......@@ -105,7 +105,7 @@ class MasterStorageHandlerTests(NeoTestBase):
oid_list = self.getOID(), self.getOID()
msg_id = 1
# a faked event manager
connection_list = [client_conn_1, client_conn_2, storage_conn_1,
connection_list = [client_conn_1, client_conn_2, storage_conn_1,
storage_conn_2]
self.app.em = Mock({"getConnectionList" : connection_list})
# register a transaction
......
......@@ -108,7 +108,7 @@ class testTransactionManager(NeoTestBase):
tid1 = txnman.begin(node1, None)
self.assertTrue(tid1 is not None)
self.assertEqual(txnman.getLastTID(), tid1)
# set a new last TID
# set a new last TID
ntid = pack('!Q', unpack('!Q', tid1)[0] + 10)
txnman.setLastTID(ntid)
self.assertEqual(txnman.getLastTID(), ntid)
......
......@@ -66,7 +66,7 @@ def resolve(hostname):
except socket.gaierror:
return None
return address_list[0]
def parseMasterList(masters, except_node=None):
if not masters:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment