Commit 61d37895 authored by Julien Muchembled's avatar Julien Muchembled

Some minor cleanup

parent 49edad32
...@@ -300,9 +300,7 @@ class TestRunner(BenchmarkRunner): ...@@ -300,9 +300,7 @@ class TestRunner(BenchmarkRunner):
def main(args=None): def main(args=None):
runner = TestRunner() runner = TestRunner()
runner.run() runner.run()
if not runner.was_successful(): return sys.exit(not runner.was_successful())
sys.exit(1)
sys.exit(0)
if __name__ == "__main__": if __name__ == "__main__":
main() main()
...@@ -36,7 +36,7 @@ class BaseMasterHandler(EventHandler): ...@@ -36,7 +36,7 @@ class BaseMasterHandler(EventHandler):
raise PrimaryFailure('re-election occurs') raise PrimaryFailure('re-election occurs')
def notifyClusterInformation(self, conn, state): def notifyClusterInformation(self, conn, state):
neo.lib.logging.warning('ignoring notify cluster information in %s' % neo.lib.logging.warning('ignoring notify cluster information in %s',
self.__class__.__name__) self.__class__.__name__)
def notifyLastOID(self, conn, oid): def notifyLastOID(self, conn, oid):
...@@ -49,7 +49,7 @@ class BaseMasterHandler(EventHandler): ...@@ -49,7 +49,7 @@ class BaseMasterHandler(EventHandler):
for node_type, addr, uuid, state in node_list: for node_type, addr, uuid, state in node_list:
if uuid == self.app.uuid: if uuid == self.app.uuid:
# This is me, do what the master tell me # This is me, do what the master tell me
neo.lib.logging.info("I was told I'm %s" %(state)) neo.lib.logging.info("I was told I'm %s", state)
if state in (NodeStates.DOWN, NodeStates.TEMPORARILY_DOWN, if state in (NodeStates.DOWN, NodeStates.TEMPORARILY_DOWN,
NodeStates.BROKEN): NodeStates.BROKEN):
erase = state == NodeStates.DOWN erase = state == NodeStates.DOWN
......
...@@ -38,9 +38,8 @@ class VerificationHandler(BaseMasterHandler): ...@@ -38,9 +38,8 @@ class VerificationHandler(BaseMasterHandler):
conn.answer(Packets.AnswerLastIDs(oid, tid, app.pt.getID())) conn.answer(Packets.AnswerLastIDs(oid, tid, app.pt.getID()))
def askPartitionTable(self, conn): def askPartitionTable(self, conn):
ptid = self.app.pt.getID() pt = self.app.pt
row_list = self.app.pt.getRowList() conn.answer(Packets.AnswerPartitionTable(pt.getID(), pt.getRowList()))
conn.answer(Packets.AnswerPartitionTable(ptid, row_list))
def notifyPartitionChanges(self, conn, ptid, cell_list): def notifyPartitionChanges(self, conn, ptid, cell_list):
"""This is very similar to Send Partition Table, except that """This is very similar to Send Partition Table, except that
......
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