Switch to generic RedisError

Fixes #1558
This commit is contained in:
Joseph Schorr 2016-06-20 11:20:17 -04:00
parent e6d214c955
commit 986d20bcad
2 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
import logging
from redis import ConnectionError
from redis import RedisError
from redlock import RedLock, RedLockError
from app import app
@ -37,8 +37,8 @@ class GlobalLock(object):
except RedLockError:
logger.debug('Could not acquire lock %s', self._lock_name)
return False
except ConnectionError as ce:
logger.debug('Could not connect to Redis for lock %s: %s', self._lock_name, ce)
except RedisError as re:
logger.debug('Could not connect to Redis for lock %s: %s', self._lock_name, re)
return False