diff options
author | andy <andy@whiskeymedia.com> | 2013-06-04 17:23:50 -0400 |
---|---|---|
committer | andy <andy@whiskeymedia.com> | 2013-06-04 17:23:50 -0400 |
commit | 5e30cd66fabe06b67298c4946b412a0f08fdab5c (patch) | |
tree | edaa2ba95b9b5d943b6e489a4cb5a3cc99718edd | |
parent | 4b0e43eedc457b7f3c41885427c3fc5bd4ade7d1 (diff) | |
parent | bb16aaf35d15d20c6ae2f3bbfa0d8a3cd1664548 (diff) | |
download | redis-py-5e30cd66fabe06b67298c4946b412a0f08fdab5c.tar.gz |
Merge branch 'master' into pytest
-rw-r--r-- | redis/__init__.py | 2 | ||||
-rw-r--r-- | redis/connection.py | 3 | ||||
-rw-r--r-- | redis/exceptions.py | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/redis/__init__.py b/redis/__init__.py index 949ea70..8590b1b 100644 --- a/redis/__init__.py +++ b/redis/__init__.py @@ -9,6 +9,7 @@ from redis.utils import from_url from redis.exceptions import ( AuthenticationError, ConnectionError, + BusyLoadingError, DataError, InvalidResponse, PubSubError, @@ -26,4 +27,5 @@ __all__ = [ 'Connection', 'UnixDomainSocketConnection', 'RedisError', 'ConnectionError', 'ResponseError', 'AuthenticationError', 'InvalidResponse', 'DataError', 'PubSubError', 'WatchError', 'from_url', + 'BusyLoadingError' ] diff --git a/redis/connection.py b/redis/connection.py index e138d4c..343c838 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -9,6 +9,7 @@ from redis._compat import (b, xrange, imap, byte_to_chr, unicode, bytes, long, from redis.exceptions import ( RedisError, ConnectionError, + BusyLoadingError, ResponseError, InvalidResponse, AuthenticationError, @@ -37,7 +38,7 @@ class PythonParser(object): EXCEPTION_CLASSES = { 'ERR': ResponseError, 'EXECABORT': ExecAbortError, - 'LOADING': ConnectionError, + 'LOADING': BusyLoadingError, 'NOSCRIPT': NoScriptError, } diff --git a/redis/exceptions.py b/redis/exceptions.py index af30cbf..d67afa7 100644 --- a/redis/exceptions.py +++ b/redis/exceptions.py @@ -17,6 +17,10 @@ class ConnectionError(ServerError): pass +class BusyLoadingError(ConnectionError): + pass + + class InvalidResponse(ServerError): pass |