File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 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(
871871
872872 # Validate modules
873873 installed_modules = await RedisConnectionFactory .get_modules_async (redis_client )
874+
874875 try :
875876 required_modules = [
876877 {"name" : "search" , "ver" : 20810 },
@@ -880,7 +881,7 @@ async def from_existing(
880881 except RedisModuleVersionError as e :
881882 raise RedisModuleVersionError (
882883 f"Loading from existing index failed. { str (e )} "
883- )
884+ ) from e
884885
885886 # Fetch index info and convert to schema
886887 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(
144144 if int (installed_version ) >= int (required_module ["ver" ]): # type: ignore
145145 return
146146
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 (
150149 [f'{ module ["name" ]} >= { module ["ver" ]} ' for module in required_modules ]
151150 )
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/."
155154 )
156155
157156 raise RedisModuleVersionError (error_message )
You can’t perform that action at this time.
0 commit comments