fd
This commit is contained in:
parent
616b72792a
commit
4c439bfdf2
1 changed files with 2 additions and 3 deletions
|
@ -191,10 +191,9 @@ def post_id(pid, anything=None, v=None):
|
||||||
|
|
||||||
session[str(post.id)] = int(time.time())
|
session[str(post.id)] = int(time.time())
|
||||||
|
|
||||||
test = session.items()
|
for key, val in session.items():
|
||||||
for key, val in test:
|
|
||||||
if type(val) is int and key not in ['login_nonce','user_id']:
|
if type(val) is int and key not in ['login_nonce','user_id']:
|
||||||
if time.time() - val > 86400: del session[key]
|
if time.time() - val > 86400: session.pop(key)
|
||||||
|
|
||||||
print(session)
|
print(session)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue