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

Support older Python 2.7 versions #13

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

Conversation

clach04
Copy link

@clach04 clach04 commented May 2, 2017

Python 2.7.2 and 2.7.3 struct.unpack() fail with:

error: unpack requires a string argument of length 4

If key is passed in as a bytearray parameter, this is fine in later 2.7.x versions and Python 3.x. Casting as bytes() works for both Python 2.7.x and 3.x.

http://stackoverflow.com/questions/20612587/struct-unpack-with-bytearrays has more information

Python 2.7.2 and 2.7.3 struct.unpack() fail with:

    error: unpack requires a string argument of length 4

Due to bytearray parameter. Casting as bytes() works for both Python 2.7.x and 3.x.

http://stackoverflow.com/questions/20612587/struct-unpack-with-bytearrays has more information
@clach04
Copy link
Author

clach04 commented Dec 2, 2017

Can this be merged?

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