From d311f87bcabb0485e7cd6baa78ebfa4e96f1f4ad Mon Sep 17 00:00:00 2001 From: thomwolf Date: Fri, 7 Feb 2020 00:05:28 +0100 Subject: [PATCH] cleanup --- src/transformers/file_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transformers/file_utils.py b/src/transformers/file_utils.py index 93a19a60132..ddbac788c69 100644 --- a/src/transformers/file_utils.py +++ b/src/transformers/file_utils.py @@ -287,6 +287,8 @@ def cached_path( tar_file = tarfile.open(output_path) tar_file.extractall(output_path_extracted) tar_file.close() + else: + raise EnvironmentError("Archive format of {} could not be identified".format(output_path)) return output_path_extracted