File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
components/clp-package-utils/clp_package_utils Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -564,16 +564,17 @@ def validate_path_for_container_mount(path: pathlib.Path) -> None:
564564
565565def validate_dataset (db_config : Database , dataset : str ) -> None :
566566 """
567- Checks if `dataset` currently exists in the metadata database.
567+ Validates that `dataset` exists in the metadata database.
568+
568569 :param db_config:
569570 :param dataset:
570- :raise: ValueError
571+ :raise: ValueError if the dataset doesn't exist.
571572 """
572- sql_adapter : SQL_Adapter = SQL_Adapter (db_config )
573- clp_db_connection_params : dict [ str , any ] = db_config .get_clp_connection_params_and_type (True )
574- table_prefix : str = clp_db_connection_params ["table_prefix" ]
573+ sql_adapter = SQL_Adapter (db_config )
574+ clp_db_connection_params = db_config .get_clp_connection_params_and_type (True )
575+ table_prefix = clp_db_connection_params ["table_prefix" ]
575576 with closing (sql_adapter .create_connection (True )) as db_conn , closing (
576577 db_conn .cursor (dictionary = True )
577578 ) as db_cursor :
578579 if dataset not in fetch_existing_datasets (db_cursor , table_prefix ):
579- raise ValueError (f"Dataset `{ dataset } ` does not exist." )
580+ raise ValueError (f"Dataset `{ dataset } ` doesn't exist." )
You can’t perform that action at this time.
0 commit comments