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

Fix issue deanmalmgren#342 #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheElementalOfDestruction

Added a fix for issue #342 caused by extract_msg.Message._getStringStream returning None for streams that are not found in the MSG file (this is intentional and should be handled accordingly). ensure_bytes now checks for None and returns an empty bytes string when found.

Additionally, updated the naming used in the documentation to match the current naming.

Also, for clarification, extract_msg.Message._getStringStream should only ever be returning unicode on Python 2 and str on Python 3. If this is not the case, that is a bug that should be reported.

(By the way, contributing guidelines say to use issue2pr for existing issues, but I couldn't get it to work at all.)

Clarification, _getStringStream *should* return `unicode` in Python 2, `str` in Python 3, IF the stream requested exists. If it does not exist, it returns `None`, which cannot be added to bytes. This commit adds a check for None, returning an empty bytes string if matched.
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.

1 participant