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

Fixed undefined variable in logging #5556

Merged
merged 1 commit into from Jun 26, 2021

Conversation

radarhere
Copy link
Member

Resolves #5555

In TiffImagePlugin, values might not be defined when it is comes to be used in logging.

if is_ifd:
    ...
else:
    values = value if isinstance(value, tuple) else (value,)
    ...

...
msg += " - value: " + (
    "<table: %d bytes>" % len(data) if len(data) >= 16 else str(values)
)

This PR fixes it by ensuring that values is always defined.

@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Jun 25, 2021
@hugovk hugovk merged commit 52856bc into python-pillow:master Jun 26, 2021
@radarhere radarhere deleted the empty_subifd branch June 26, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature.
Projects
None yet
2 participants