utils.py
branch3.5
changeset 3155 14e30e2520d7
parent 3146 cfc4344023f2
child 3293 69c0ba095536
child 3316 c4c07aab1c39
equal deleted inserted replaced
3154:575a42bce11f 3155:14e30e2520d7
   112         msg = str(key) + "%.10f" % time() + str(randint(0, 1000000))
   112         msg = str(key) + "%.10f" % time() + str(randint(0, 1000000))
   113         return md5(msg).hexdigest()
   113         return md5(msg).hexdigest()
   114 else:
   114 else:
   115     from uuid import uuid4
   115     from uuid import uuid4
   116     def make_uid(key):
   116     def make_uid(key):
   117         return key + str(uuid4())
   117         return str(key) + str(uuid4())
   118 
   118 
   119 def dump_class(cls, clsname):
   119 def dump_class(cls, clsname):
   120     """create copy of a class by creating an empty class inheriting
   120     """create copy of a class by creating an empty class inheriting
   121     from the given cls.
   121     from the given cls.
   122 
   122