diff --git a/can/io/logger.py b/can/io/logger.py index 09312101b..a254fb146 100644 --- a/can/io/logger.py +++ b/can/io/logger.py @@ -105,6 +105,10 @@ def compress( File will automatically recompress upon close. """ real_suffix = pathlib.Path(filename).suffixes[-2].lower() + if real_suffix in (".blf", ".db"): + raise ValueError( + f"The file type {real_suffix} is currently incompatible with gzip." + ) if kwargs.get("append", False): mode = "ab" if real_suffix == ".blf" else "at" else: