summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
Diffstat (limited to 'redis')
-rw-r--r--redis/client.py4
-rw-r--r--redis/exceptions.py6
-rw-r--r--redis/utils.py1
3 files changed, 10 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py
index 8db2b0e..33e4aaf 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -216,7 +216,8 @@ class StrictRedis(object):
string_keys_to_dict('ZRANK ZREVRANK', int_or_none),
{
'BGREWRITEAOF': (
- lambda r: nativestr(r) == 'Background rewriting of AOF file started'
+ lambda r: nativestr(r) == ('Background rewriting of AOF '
+ 'file started')
),
'BGSAVE': lambda r: nativestr(r) == 'Background saving started',
'CLIENT': parse_client,
@@ -1363,6 +1364,7 @@ class StrictRedis(object):
"""
return Script(self, script)
+
class Redis(StrictRedis):
"""
Provides backwards compatibility with older versions of redis-py that
diff --git a/redis/exceptions.py b/redis/exceptions.py
index 34e3816..af30cbf 100644
--- a/redis/exceptions.py
+++ b/redis/exceptions.py
@@ -8,15 +8,19 @@ class RedisError(Exception):
class AuthenticationError(RedisError):
pass
+
class ServerError(RedisError):
pass
+
class ConnectionError(ServerError):
pass
+
class InvalidResponse(ServerError):
pass
+
class ResponseError(RedisError):
pass
@@ -32,8 +36,10 @@ class PubSubError(RedisError):
class WatchError(RedisError):
pass
+
class NoScriptError(ResponseError):
pass
+
class ExecAbortError(ResponseError):
pass
diff --git a/redis/utils.py b/redis/utils.py
index 20cef6c..7c04a71 100644
--- a/redis/utils.py
+++ b/redis/utils.py
@@ -1,5 +1,6 @@
from redis.client import Redis
+
def from_url(url, db=None, **kwargs):
"""Returns an active Redis client generated from the given database URL.