diff --git a/code-postprocessing/cocopp/findfiles.py b/code-postprocessing/cocopp/findfiles.py index 1c0c17b1e..192630c82 100644 --- a/code-postprocessing/cocopp/findfiles.py +++ b/code-postprocessing/cocopp/findfiles.py @@ -120,7 +120,8 @@ def get_directory(directory, extract_files): raise IOError(2, 'Some of the files cannot be extracted ' + 'from "%s". The path is too long.' % directory) - tar_file.extractall(dir_name, filter='data') + try: tar_file.extractall(dir_name, filter='data') + except TypeError: tar_file.extractall(dir_name) # Windows # TarFile.open handles tar.gz/tgz print(' archive extracted to folder', dir_name, '...') directory = dir_name diff --git a/code-postprocessing/cocopp/pproc.py b/code-postprocessing/cocopp/pproc.py index 52e03503a..dcc617618 100644 --- a/code-postprocessing/cocopp/pproc.py +++ b/code-postprocessing/cocopp/pproc.py @@ -563,7 +563,7 @@ class DataSet(object): >>> def setup(infoFile): ... if not os.path.exists(infoFile): ... filename = cocopp.archives.bbob.get_one('2009/BIPOP-CMA-ES_hansen') - ... tarfile.open(filename).extractall(cocopp.archives.bbob.local_data_path, filter='data') + ... tarfile.open(filename).extractall(cocopp.archives.bbob.local_data_path) >>> infoFile = os.path.join(cocopp.archives.bbob.local_data_path, 'BIPOP-CMA-ES', 'bbobexp_f2.info') >>> print('get'); setup(infoFile) # doctest:+ELLIPSIS get... @@ -670,7 +670,7 @@ class DataSet(object): >>> infoFile = os.path.join(cocopp.archives.bbob.local_data_path, 'BIPOP-CMA-ES', 'bbobexp_f2.info') >>> if not os.path.exists(infoFile): ... filename = cocopp.archives.bbob.get_one('bbob/2009/BIPOP-CMA-ES_hansen') - ... tarfile.open(filename).extractall(cocopp.archives.bbob.local_data_path, filter='data') + ... tarfile.open(filename).extractall(cocopp.archives.bbob.local_data_path) >>> dslist = cocopp.load(infoFile) Data consistent according to consistency_check() in pproc.DataSet >>> dslist[2].instancenumbers