Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update redis_.py

Update redis to pickup config-supplied passwords.

StrictRedis doesn't use extra kwargs if using connection_pool, so it misses the password, etc.

Also, for whatever reason, "params" in open_connection() is an empty dict for me when I printed debug output, i.e. {}, no password.
  • Loading branch information...
commit c512e71d31e21a993acad81d319abaeb3048e7cc 1 parent 0c47a0f
@natej natej authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 beaker_extensions/redis_.py
View
4 beaker_extensions/redis_.py
@@ -20,6 +20,7 @@ def __init__(self,
lock_dir=None,
**params):
self.db = params.pop('db', None)
+ self.dbpass = params.pop('password', None)
self.connection_pools = {}
NoSqlManager.__init__(self,
namespace,
@@ -33,7 +34,8 @@ def open_connection(self, host, port, **params):
if pool_key not in self.connection_pools:
self.connection_pools[pool_key] = ConnectionPool(host=host,
port=port,
- db=self.db)
+ db=self.db,
+ password=self.dbpass)
self.db_conn = StrictRedis(connection_pool=self.connection_pools[pool_key],
**params)
Please sign in to comment.
Something went wrong with that request. Please try again.