import threading, time, pickle, random, os
+<<<<<<< HEAD
import cookie, env
+=======
+from . import cookie, env, proto
+>>>>>>> master
__all__ = ["db", "get"]
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())