equal
deleted
inserted
replaced
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 |