Commit 0b0fe86d authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove a XXX by explicitely using the constant imported from protocol module.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1000 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 13ed7e95
...@@ -23,7 +23,7 @@ from struct import pack, unpack ...@@ -23,7 +23,7 @@ from struct import pack, unpack
from neo.config import ConfigurationManager from neo.config import ConfigurationManager
from neo import protocol from neo import protocol
from neo.protocol import RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, \ from neo.protocol import RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, \
UUID_NAMESPACES, BOOTING UUID_NAMESPACES, BOOTING, INVALID_UUID
from neo.node import NodeManager, MasterNode, StorageNode, ClientNode, AdminNode from neo.node import NodeManager, MasterNode, StorageNode, ClientNode, AdminNode
from neo.event import EventManager from neo.event import EventManager
from neo.connection import ListeningConnection, ClientConnection, ServerConnection from neo.connection import ListeningConnection, ClientConnection, ServerConnection
...@@ -723,7 +723,7 @@ class Application(object): ...@@ -723,7 +723,7 @@ class Application(object):
def getNewUUID(self, node_type): def getNewUUID(self, node_type):
# build an UUID # build an UUID
uuid = os.urandom(15) uuid = os.urandom(15)
while uuid == '\00' * 15: # XXX: INVALID_UUID[1:] while uuid == protocol.INVALID_UUID[1:]:
uuid = os.urandom(15) uuid = os.urandom(15)
# look for the prefix # look for the prefix
prefix = UUID_NAMESPACES.get(node_type, None) prefix = UUID_NAMESPACES.get(node_type, None)
......
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