Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
3a77409
691f278
)
Merge branch 'master' into python3
author
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 3 Apr 2014 04:03:53 +0000
(06:03 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 3 Apr 2014 04:03:53 +0000
(06:03 +0200)
Conflicts:
wrw/session.py
1
2
wrw/session.py
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
wrw/session.py
index
e7d8581
,
0c585a3
..
3185b0b
---
1
/
wrw/session.py
---
2
/
wrw/session.py
+++ b/
wrw/session.py
@@@
-1,5
-1,5
+1,5
@@@
--import threading, time, pickle, random, os
-import cookie, env
++import threading, time, pickle, random, os
, binascii
+
from .
import cookie, env
__all__ = ["db", "get"]
@@@
-17,7
-8,7
+8,7
@@@
def gennonce(length)
class session(object):
def __init__(self, lock, expire=86400 * 7):
- self.id = hexencode(gennonce(16))
- self.id = gennonce(16).encode("hex")
++ self.id = binascii.b2a_hex(gennonce(16))
self.dict = {}
self.lock = lock
self.ctime = self.atime = self.mtime = int(time.time())