Example #1
0
    def getSocketId(self):
        socketId = int(getUniqueId())

        while socketId in self.sockets:
            socketId = int(getUniqueId())

        return socketId
def getCode(maxInstances):
    while True:
        try:
            code = unicode(getUniqueId())
            addCode(code, maxInstances)
            return code
        except DuplicateKeyError:
            pass
 def func():
     instanceKey = unicode(getUniqueId())
     while instanceKey in self._by_instance_key:
         instanceKey = unicode(getUniqueId())
     return instanceKey
Example #4
0
def getHashKey(hashKey):
    if hashKey is None:
        hashKey = getUniqueId()

    return hash(hashKey)
Example #5
0
def getHashKey(hashKey):
    if hashKey is None:
        hashKey = getUniqueId()

    return hash(hashKey)