Mercurial > traipse_dev
comparison plugins/cherrypy/_cphttptools.py @ 19:78407d627cba traipse_dev
Beginning of Code Clean-up. Some code untested, may break!
author | sirebral |
---|---|
date | Sat, 25 Jul 2009 17:24:40 -0500 |
parents | 4385a7d0efd1 |
children |
comparison
equal
deleted
inserted
replaced
18:67b900deb35c | 19:78407d627cba |
---|---|
416 def generateSessionId(): | 416 def generateSessionId(): |
417 s = '' | 417 s = '' |
418 for i in range(50): | 418 for i in range(50): |
419 s += random.choice(string.letters+string.digits) | 419 s += random.choice(string.letters+string.digits) |
420 s += '%s'%time.time() | 420 s += '%s'%time.time() |
421 return hashlib.hashlib(s).hexdigest() | 421 return hashlib.shal(s).hexdigest() |
422 | 422 |
423 def getObjFromPath(objPathList, objCache): | 423 def getObjFromPath(objPathList, objCache): |
424 """ For a given objectPathList (like ['root', 'a', 'b', 'index']), | 424 """ For a given objectPathList (like ['root', 'a', 'b', 'index']), |
425 return the object (or None if it doesn't exist). | 425 return the object (or None if it doesn't exist). |
426 Also keep a cache for maximum efficiency | 426 Also keep a cache for maximum efficiency |