summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2015-11-02 10:32:54 -0800
committerAndy McCurdy <andy@andymccurdy.com>2015-11-02 10:32:54 -0800
commit9c13fcfe2ed575c5bc69db9d9fc48582d107df98 (patch)
tree27daffec7e79de103ebe2c5ab5ba39c54e2e3761 /redis
parent7360a0d6211fd8236a412031c936c879f002a20a (diff)
downloadredis-py-9c13fcfe2ed575c5bc69db9d9fc48582d107df98.tar.gz
cleanup
Diffstat (limited to 'redis')
-rwxr-xr-xredis/connection.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 980354d..776bab8 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -81,7 +81,6 @@ class Token(object):
class BaseParser(object):
EXCEPTION_CLASSES = {
'ERR': {
- 'default': ResponseError,
'max number of clients reached': ConnectionError
},
'EXECABORT': ExecAbortError,
@@ -97,12 +96,8 @@ class BaseParser(object):
response = response[len(error_code) + 1:]
exception_class = self.EXCEPTION_CLASSES[error_code]
if isinstance(exception_class, dict):
- return exception_class.get(
- response,
- exception_class['default']
- )(response)
- else:
- return exception_class(response)
+ exception_class = exception_class.get(response, ResponseError)
+ return exception_class(response)
return ResponseError(response)