utils.py
branchstable
changeset 4693 1eaf5ce04844
parent 4653 ca11228a5268
child 4830 10e8bc190695
child 4833 41a78fb4107c
child 4859 f65208c9dbdc
equal deleted inserted replaced
4692:11a040e2601c 4693:1eaf5ce04844
    24     from md5 import md5
    24     from md5 import md5
    25     from random import randint
    25     from random import randint
    26 
    26 
    27     def make_uid(key):
    27     def make_uid(key):
    28         """forge a unique identifier
    28         """forge a unique identifier
    29         not that unique on win32"""
    29         XXX not that unique on win32
    30         msg = str(key) + "%.10f" % time() + str(randint(0, 1000000))
    30         """
    31         return md5(msg).hexdigest()
    31         key = str(key)
       
    32         msg = key + "%.10f" % time() + str(randint(0, 1000000))
       
    33         return key + md5(msg).hexdigest()
    32 
    34 
    33 else:
    35 else:
    34 
    36 
    35     from uuid import uuid4
    37     from uuid import uuid4
    36 
    38