summaryrefslogtreecommitdiffstats
path: root/nfsw/io.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-09-30 18:25:30 -0400
committerrsiddharth <s@ricketyspace.net>2019-09-30 18:25:30 -0400
commitde6a180be30eba40047b796ef4bf3f37b26edaa1 (patch)
treeed707960ae0c909da7407fbc4a0eb9e6b15995d5 /nfsw/io.py
parent4220a7a830aa82761452dbafeb6cc9cfc004b6dd (diff)
nfsw/io.py: Update preprocess.
nfsw/io.py (preprocess): Use RedisC for Redis calls.
Diffstat (limited to 'nfsw/io.py')
-rw-r--r--nfsw/io.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nfsw/io.py b/nfsw/io.py
index bba1752..6cb3e2d 100644
--- a/nfsw/io.py
+++ b/nfsw/io.py
@@ -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):