Skip to content

Commit d60fce5

Browse files
author
Simon Prickett
committed
Fixed check for presence of modules.
1 parent e9fbd56 commit d60fce5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

aredis_om/checks.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66

77
@lru_cache(maxsize=None)
88
async def check_for_command(conn, cmd):
9-
try:
10-
cmd_info = await conn.execute_command("command", "info", cmd)
11-
return True
12-
except TypeError:
13-
return False
9+
cmd_info = await conn.execute_command("command", "info", cmd)
10+
return not None in cmd_info
1411

1512
@lru_cache(maxsize=None)
1613
async def has_redis_json(conn=None):

0 commit comments

Comments
 (0)