diff options
author | rsiddharth <s@ricketyspace.net> | 2019-09-30 18:25:30 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-09-30 18:25:30 -0400 |
commit | de6a180be30eba40047b796ef4bf3f37b26edaa1 (patch) | |
tree | ed707960ae0c909da7407fbc4a0eb9e6b15995d5 | |
parent | 4220a7a830aa82761452dbafeb6cc9cfc004b6dd (diff) |
nfsw/io.py: Update preprocess.
nfsw/io.py (preprocess): Use RedisC for Redis calls.
-rw-r--r-- | nfsw/io.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,7 +3,7 @@ import functools import nfsw.scenes as scenes from nfsw.auth import login_required, login_required_ajax -from nfsw.redis import redis as r, key as k +from nfsw.redis import redis as r, redisc, key as k from nfsw.scenes import current_scene from nfsw.util import read_junk @@ -17,8 +17,11 @@ bp = Blueprint('io', __name__) def preprocess(view): def setup(): - if not r().exists(k('scene')): - r().set(k('scene'), 'sexshop') + r = redisc() + + if not r.exists('scene'): + r.set('scene', 'sexshop') + @functools.wraps(view) def wrapped_view(**kwargs): |