Skip to content

Commit

Permalink
new support for session file path
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 7, 2015
1 parent 2830435 commit e43bd7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/quorum/redisdb.py
Expand Up @@ -37,9 +37,11 @@
__license__ = "Apache License, Version 2.0"
""" The license for the module """

import os
import json
import shelve

from . import config
from . import exceptions

try: import redis
Expand Down Expand Up @@ -96,8 +98,10 @@ class RedisShelve(RedisMemory):

def __init__(self, path = "redis.shelve"):
RedisMemory.__init__(self)
base_path = config.conf("SESSION_FILE_PATH", "")
file_path = os.path.join(base_path, path)
self.values = shelve.open(
path,
file_path,
protocol = 2,
writeback = True
)
Expand Down

0 comments on commit e43bd7e

Please sign in to comment.