Skip to content
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

Merged
merged 4 commits into from
Jun 28, 2016
Merged

Mutagen cleanup #2088

merged 4 commits into from
Jun 28, 2016

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Jun 27, 2016

No description provided.

@ghost
Copy link

ghost commented Jun 27, 2016

@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)
Copy link

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.
@sampsyo sampsyo merged commit 629241e into beetbox:master Jun 28, 2016
sampsyo added a commit that referenced this pull request Jun 28, 2016
@sampsyo
Copy link
Member

sampsyo commented Jun 28, 2016

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.

@lazka
Copy link
Contributor Author

lazka commented Jun 28, 2016

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!

sampsyo added a commit that referenced this pull request Jun 28, 2016
This lets us remove a few more workarounds that Mutagen itself has addressed
already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants