@@ -159,7 +159,7 @@ def list_datasets(offset=None, size=None, tag=None):
159159
160160def _list_datasets (api_call ):
161161 # TODO add proper error handling here!
162- return_code , xml_string = _perform_api_call (api_call )
162+ xml_string = _perform_api_call (api_call )
163163 datasets_dict = xmltodict .parse (xml_string )
164164
165165 # Minimalistic check if the XML is useful
@@ -301,8 +301,7 @@ def _get_dataset_description(did_cache_dir, dataset_id):
301301 try :
302302 return _get_cached_dataset_description (dataset_id )
303303 except (OpenMLCacheException ):
304- return_code , dataset_xml = _perform_api_call (
305- "data/%d" % dataset_id )
304+ dataset_xml = _perform_api_call ("data/%d" % dataset_id )
306305
307306 with io .open (description_file , "w" , encoding = 'utf8' ) as fh :
308307 fh .write (dataset_xml )
@@ -347,7 +346,7 @@ def _get_dataset_arff(did_cache_dir, description):
347346 pass
348347
349348 url = description ['oml:url' ]
350- return_code , arff_string = _read_url (url )
349+ arff_string = _read_url (url )
351350
352351 with io .open (output_file_path , "w" , encoding = 'utf8' ) as fh :
353352 fh .write (arff_string )
@@ -382,8 +381,7 @@ def _get_dataset_features(did_cache_dir, dataset_id):
382381 with io .open (features_file , encoding = 'utf8' ) as fh :
383382 features_xml = fh .read ()
384383 except (OSError , IOError ):
385- return_code , features_xml = _perform_api_call (
386- "data/features/%d" % dataset_id )
384+ features_xml = _perform_api_call ("data/features/%d" % dataset_id )
387385
388386 with io .open (features_file , "w" , encoding = 'utf8' ) as fh :
389387 fh .write (features_xml )
@@ -417,8 +415,7 @@ def _get_dataset_qualities(did_cache_dir, dataset_id):
417415 with io .open (qualities_file , encoding = 'utf8' ) as fh :
418416 qualities_xml = fh .read ()
419417 except (OSError , IOError ):
420- return_code , qualities_xml = _perform_api_call (
421- "data/qualities/%d" % dataset_id )
418+ qualities_xml = _perform_api_call ("data/qualities/%d" % dataset_id )
422419
423420 with io .open (qualities_file , "w" , encoding = 'utf8' ) as fh :
424421 fh .write (qualities_xml )
0 commit comments