diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | redis/connection.py | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,6 @@ * 2.4.11 (in development) + * AuthenticationError will now be correctly raised if an invalid password + is supplied. * If Hiredis is unavailable, the HiredisParser will raise a RedisError if selected manually. * 2.4.10 diff --git a/redis/connection.py b/redis/connection.py index 5a0b511..1a5466f 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -4,7 +4,8 @@ from redis.exceptions import ( RedisError, ConnectionError, ResponseError, - InvalidResponse + InvalidResponse, + AuthenticationError ) try: @@ -215,7 +216,7 @@ class Connection(object): if self.password: self.send_command('AUTH', self.password) if self.read_response() != 'OK': - raise ConnectionError('Invalid Password') + raise AuthenticationError('Invalid Password') # if a database is specified, switch to it if self.db: |