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

Bug in mp4 __render_text #236

Closed
lazka opened this issue Oct 23, 2015 · 4 comments
Closed

Bug in mp4 __render_text #236

lazka opened this issue Oct 23, 2015 · 4 comments
Labels
bug

Comments

@lazka
Copy link
Member

@lazka lazka commented Oct 23, 2015

Originally reported by: Sophist UK (Bitbucket: Sophist-UK, GitHub: Sophist-UK)


If an unknown tag value is a number rather than a string, then code in __render_text fails o convert it to a list.

Instead of:

#!python
        if isinstance(value, string_types):
            value = [value]

it should read:

#!python
        if not isinstance(value, list):
            value = [value]

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 23, 2015

Original comment by Sophist UK (Bitbucket: Sophist-UK, GitHub: Sophist-UK):


Or the code should perhaps read:

#!python
if not isinstance(value, list):
            value = [str(value)]
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Nov 5, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


Thanks. I prefer if it would error out in this case.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Nov 5, 2015

Original comment by Sophist UK (Bitbucket: Sophist-UK, GitHub: Sophist-UK):


Personally I would prefer to see it handle numeric values, but it is of course your decision.

But if you are going to have it error on a numeric value, can we ensure that the error message is clear that it needs to be a string value.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Nov 22, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


mp4: validate values in setitem so things don't fail in save(). Fixes #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.