Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
51879 fix binary pillar return error #52334
What does this PR do?
Restores a previous behavior - allows binary GPG pillar data.
What issues does this PR fix or reference?
The original behavior on Python2 was that binary or text could be intermingled. When Python 3 support was introduced, we accidentally broke that backwards compatibility - say you had binary data stored in a GPG pillar (the simplest example is the byte
Now if we have a UnicodeDecodeError we assume that the data was meant to be binary data. Also, the
Commits signed with GPG?
There's no real reason that pillars can't/shouldn't be able to contain binary data. This gives us the ability to say that it's OK.
Try to encode as unicode, but if not, just fall back to binary. That's probably what the data was in the first place.