Skip to content

Conversation

@unformatt
Copy link
Contributor

Also removes trailing whitespace

#10

def __getObjHeader(self, offset):
obj_header = self.data[offset]

if type(obj_header) == str:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure we don't need that check because the BPlistReader() expects an str as input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So reading from string never worked or something changed in python2?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a tricky question to answer now, given I never wrote unit tests for this :-)

I'm pretty sure all codepaths used to work, but I went back to python 2.5 and it's still a problem there. This package is clearly not the most popular one so maybe it was a bug all these years.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, I feel like it's safer to leave the check in there

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.

2 participants