From a0d9b2292617183cfdd746257037081141fe0c54 Mon Sep 17 00:00:00 2001 From: Josef Friedrich Date: Sun, 11 Feb 2024 11:01:07 +0100 Subject: [PATCH] Throw no error is the score is already compressed --- mscxyz/export.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mscxyz/export.py b/mscxyz/export.py index f37e9ac..4994583 100644 --- a/mscxyz/export.py +++ b/mscxyz/export.py @@ -72,12 +72,11 @@ def to_extension(self, extension: str = "pdf") -> Path: def compress(self) -> Path: """Compress the score. - :return: The path of the new compress score. + :return: The path of the new compressed score or the path of the score itself + if it is already compressed. """ - if not self.score.is_uncompressed: - raise ValueError("The score is already compressed!") - + return self.score.path return self.to_extension("mscz") def reload(self, save: bool = False) -> Export: