Skip to content

Commit

Permalink
Throw no error is the score is already compressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Feb 11, 2024
1 parent 2e7cc9e commit a0d9b22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mscxyz/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a0d9b22

Please sign in to comment.