-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutagen cleanup #2088
Mutagen cleanup #2088
Conversation
@lazka : it's failing flake8 in the scrub plugin can you look into that? |
@@ -1457,6 +1457,7 @@ def delete(self): | |||
try: | |||
self.mgfile.delete() | |||
except NotImplementedError: | |||
# (Note: This is fixed in mutagen >=1.31) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you s/Note/FIXME/ here? , that way we have a marker to revisit later.
No longer needed since we depend on mutagen 1.27
Instead of the individial mutagen format exceptions use the mutagen.MutagenError exception introduced in 1.25. Since 1.33 mutagen will only raise MutagenError for load/save/delete and no longer raise IOError. Translate both errors to UnreadableFileError to support older and newer mutagen versions. Unify error handling in __init__(), save() and delete(). Since it's no longer possible to get an IOError from MediaFile, adjust all callers and tests accordingly. This was tested with mutagen 1.27 and current mutagen master.
Fantastic! Thank you, @lazka -- this helps a lot, and I'm thrilled to be able to simplify the exception handling. I'm tempted to require Mutagen 1.31 and remove those two additional workarounds you noted. If that doesn't raise any red flags for you, I'll make those changes. |
Sounds good. Thanks for the review/merge! |
This lets us remove a few more workarounds that Mutagen itself has addressed already.
No description provided.