Merge pull request #1688 from ananthb/patch-1

Import aioredis from redis module too
This commit is contained in:
_run 2022-08-30 12:28:18 +04:00 committed by GitHub
commit 095bf03227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -5,8 +5,11 @@ import json
redis_installed = True
try:
import aioredis
except:
redis_installed = False
except ImportError:
try:
from redis import asyncio as aioredis
except ImportError:
redis_installed = False
class StateRedisStorage(StateStorageBase):