mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fixed an ImportError when redis-py is not installed
This commit is contained in:
@@ -6,7 +6,6 @@ from django.utils.timezone import now
|
|||||||
from pretix import settings
|
from pretix import settings
|
||||||
|
|
||||||
from pretix.base.models import Quota
|
from pretix.base.models import Quota
|
||||||
from redis import RedisError
|
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.base.locking')
|
logger = logging.getLogger('pretix.base.locking')
|
||||||
|
|
||||||
@@ -100,6 +99,7 @@ def lock_quota_redis(quota):
|
|||||||
|
|
||||||
|
|
||||||
def release_quota_redis(quota):
|
def release_quota_redis(quota):
|
||||||
|
from redis import RedisError
|
||||||
lock = redis_lock_from_quota(quota)
|
lock = redis_lock_from_quota(quota)
|
||||||
try:
|
try:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|||||||
Reference in New Issue
Block a user