diff options
author | Paul Belanger <paul.belanger@polybeacon.com> | 2013-03-30 13:53:51 -0400 |
---|---|---|
committer | Paul Belanger <paul.belanger@polybeacon.com> | 2013-03-30 13:53:51 -0400 |
commit | 12f2e4fcd8153fb4ea9dc00ac79385b1059fb47a (patch) | |
tree | 537c61df2d334a1f49b4e93536f6b22d5e25be4c /redis | |
parent | 8063b1021718f1eb1ab87530358e70fb171f5cba (diff) | |
download | redis-py-12f2e4fcd8153fb4ea9dc00ac79385b1059fb47a.tar.gz |
Format code per pep8 guidelines
A simple patch to enable pep8 in tox and format our code properly.
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Diffstat (limited to 'redis')
-rw-r--r-- | redis/client.py | 4 | ||||
-rw-r--r-- | redis/exceptions.py | 6 | ||||
-rw-r--r-- | redis/utils.py | 1 |
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. |