Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of moltke.seatribe.se:/usr/local/src/wrw
[wrw.git]
/
wrw
/
session.py
diff --git
a/wrw/session.py
b/wrw/session.py
index
3185b0b
..
8141827
100644
(file)
--- a/
wrw/session.py
+++ b/
wrw/session.py
@@
-1,5
+1,5
@@
-import threading, time, pickle, random, os
, binascii
-from . import cookie, env
+import threading, time, pickle, random, os
+from . 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 =
binascii.b2a_
hex(gennonce(16))
+ self.id =
proto.en
hex(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())