Skip to content

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