@@ -493,15 +493,15 @@ def query_sso_maps(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
493
493
'Allowed values are {}.\n ' .format (', ' .join (map (str , self .SSO_TYPES )))
494
494
if sso_type != 'ALL' :
495
495
type_text = ' and type {}' .format (sso_type )
496
- log . info ('Found {num_sso} SSO\' s with name: {sso_name}{type_text}.\n '
497
- 'Try narrowing your search by typing a more specific sso_name.\n {specify_type}'
498
- 'The following SSO\' s were found:\n {found_ssos}'
499
- .format (num_sso = len (sso ),
500
- sso_name = sso_name ,
501
- type_text = type_text ,
502
- specify_type = specify_type ,
503
- found_ssos = '\n ' .join (map (str , sso )))
504
- )
496
+ raise ValueError ('Found {num_sso} SSO\' s with name: {sso_name}{type_text}.\n '
497
+ 'Try narrowing your search by typing a more specific sso_name.\n {specify_type}'
498
+ 'The following SSO\' s were found:\n {found_ssos}'
499
+ .format (num_sso = len (sso ),
500
+ sso_name = sso_name ,
501
+ type_text = type_text ,
502
+ specify_type = specify_type ,
503
+ found_ssos = '\n ' .join (map (str , sso )))
504
+ )
505
505
return None
506
506
507
507
sanitized_missions = self ._sanitize_input_sso_mission (missions )
@@ -513,7 +513,7 @@ def query_sso_maps(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
513
513
query_result = {}
514
514
515
515
sso_type = self ._get_sso_db_type (sso ['sso_type' ])
516
- sso_db_identifier = self ._get_db_sso_identifier (self . _get_db_sso_identifier ( sso ['sso_type' ]) )
516
+ sso_db_identifier = self ._get_db_sso_identifier (sso ['sso_type' ])
517
517
for name in sanitized_missions :
518
518
data_table = self ._find_mission_tap_table_name (sso_json , name )
519
519
mission_json = self ._find_mission_parameters_in_json (data_table , sso_json )
@@ -528,7 +528,7 @@ def query_sso_maps(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
528
528
if len (table ) > 0 :
529
529
query_result [name .upper ()] = table
530
530
531
- return query_result
531
+ return commons . TableList ( query_result )
532
532
533
533
def get_images_sso (self , * , sso_name = None , sso_type = "ALL" , table_list = None , missions = __ALL_STRING ,
534
534
download_dir = _MAPS_DOWNLOAD_DIR , cache = True ):
@@ -595,7 +595,7 @@ def get_images_sso(self, *, sso_name=None, sso_type="ALL", table_list=None, miss
595
595
if sso_name is None and table_list is None :
596
596
raise ValueError ("An input is required for either sso_name or table." )
597
597
598
- sanitized_missions = self ._sanitize_input_sso_mission (missions )
598
+ sanitized_missions = [ m . lower () for m in self ._sanitize_input_sso_mission (missions )]
599
599
sso_name = self ._sanitize_input_sso_name (sso_name )
600
600
sso_type = self ._sanitize_input_sso_type (sso_type )
601
601
if table_list is None :
@@ -1415,7 +1415,7 @@ def _sanitize_input_sso_mission(self, missions):
1415
1415
else :
1416
1416
return [missions ]
1417
1417
raise ValueError ("Mission must be either a string or a list of "
1418
- "missions" )
1418
+ "missions. Valid entries are found in list_sso() " )
1419
1419
def _get_sso_db_type (self , sso_type ):
1420
1420
sso_type = sso_type .lower ()
1421
1421
if sso_type == "asteroid" or sso_type == "dwarf_planet" :
0 commit comments