File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,7 @@ async def from_existing(
871
871
872
872
# Validate modules
873
873
installed_modules = await RedisConnectionFactory .get_modules_async (redis_client )
874
+
874
875
try :
875
876
required_modules = [
876
877
{"name" : "search" , "ver" : 20810 },
@@ -880,7 +881,7 @@ async def from_existing(
880
881
except RedisModuleVersionError as e :
881
882
raise RedisModuleVersionError (
882
883
f"Loading from existing index failed. { str (e )} "
883
- )
884
+ ) from e
884
885
885
886
# Fetch index info and convert to schema
886
887
index_info = await cls ._info (name , redis_client )
Original file line number Diff line number Diff line change @@ -144,14 +144,13 @@ def validate_modules(
144
144
if int (installed_version ) >= int (required_module ["ver" ]): # type: ignore
145
145
return
146
146
147
- error_message = "Required Redis db module "
148
-
149
- error_message += " OR " .join (
147
+ # Build the error message dynamically
148
+ required_modules_str = " OR " .join (
150
149
[f'{ module ["name" ]} >= { module ["ver" ]} ' for module in required_modules ]
151
150
)
152
-
153
- error_message += (
154
- " not installed. See Redis Stack docs at https://redis.io/docs/stack/."
151
+ error_message = (
152
+ f"Required Redis db module { required_modules_str } not installed. "
153
+ "See Redis Stack docs at https://redis.io/docs/latest/operate/oss_and_stack/install/install- stack/."
155
154
)
156
155
157
156
raise RedisModuleVersionError (error_message )
You can’t perform that action at this time.
0 commit comments