Commit 70b4c9d3 authored by Vincent Pelletier's avatar Vincent Pelletier

Import time module, not just its sleep method.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1998 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f3c5369f
...@@ -20,7 +20,7 @@ from cPickle import dumps, loads ...@@ -20,7 +20,7 @@ from cPickle import dumps, loads
from zlib import compress as real_compress, decompress from zlib import compress as real_compress, decompress
from neo.locking import Queue, Empty from neo.locking import Queue, Empty
from random import shuffle from random import shuffle
from time import sleep import time
from ZODB.POSException import UndoError, StorageTransactionError, ConflictError from ZODB.POSException import UndoError, StorageTransactionError, ConflictError
from ZODB.ConflictResolution import ResolvedSerial from ZODB.ConflictResolution import ResolvedSerial
...@@ -310,7 +310,7 @@ class Application(object): ...@@ -310,7 +310,7 @@ class Application(object):
try: try:
self.trying_master_node = master_list[index] self.trying_master_node = master_list[index]
except IndexError: except IndexError:
sleep(1) time.sleep(1)
index = 0 index = 0
self.trying_master_node = master_list[0] self.trying_master_node = master_list[0]
index += 1 index += 1
...@@ -355,7 +355,7 @@ class Application(object): ...@@ -355,7 +355,7 @@ class Application(object):
break break
if conn.getUUID() is None: if conn.getUUID() is None:
# Node identification was refused by master. # Node identification was refused by master.
sleep(1) time.sleep(1)
if self.uuid is not None: if self.uuid is not None:
msg_id = conn.ask(Packets.AskNodeInformation()) msg_id = conn.ask(Packets.AskNodeInformation())
self._waitMessage(conn, msg_id, self._waitMessage(conn, msg_id,
......
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