diff --git a/lib/galaxy/util/compression_utils.py b/lib/galaxy/util/compression_utils.py index d54c0ffcbc24..576e62623f99 100644 --- a/lib/galaxy/util/compression_utils.py +++ b/lib/galaxy/util/compression_utils.py @@ -188,6 +188,8 @@ def __init__(self, file_path: StrPath, mode: str = "r") -> None: self.file_type = "tar" elif zipfile.is_zipfile(file_path) and not file_path_str.endswith(".jar"): self.file_type = "zip" + else: + raise Exception("File must be valid zip or tar file.") self.file_name = os.path.splitext(os.path.basename(file_path))[0] if self.file_name.endswith(".tar"): self.file_name = os.path.splitext(self.file_name)[0]