Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed erroneous merge.
[wrw.git]
/
wrw
/
session.py
diff --git
a/wrw/session.py
b/wrw/session.py
index
0c585a3
..
fc918f4
100644
(file)
--- a/
wrw/session.py
+++ b/
wrw/session.py
@@
-1,5
+1,5
@@
import threading, time, pickle, random, os
import threading, time, pickle, random, os
-import cookie, env
+import cookie, env
, proto
__all__ = ["db", "get"]
__all__ = ["db", "get"]
@@
-8,7
+8,7
@@
def gennonce(length):
class session(object):
def __init__(self, lock, expire=86400 * 7):
class session(object):
def __init__(self, lock, expire=86400 * 7):
- self.id =
gennonce(16).encode("hex"
)
+ self.id =
proto.enhex(gennonce(16)
)
self.dict = {}
self.lock = lock
self.ctime = self.atime = self.mtime = int(time.time())
self.dict = {}
self.lock = lock
self.ctime = self.atime = self.mtime = int(time.time())