Backport execReadlines UTF-8 fix#1515
Merged
Merged
Conversation
To prevent an error like: "ERROR livemedia-creator: 'utf-8' codec can't decode byte 0xd1 in position 4095: unexpected end of data", when using a ru-RU.UTF8 locale. It is proposed to decode already deserialized data. (cherry picked from commit 28f5836) Related: RHEL-121651
This allows it to properly handle unicode output from the process that is being run. I have been able to reproduce the failure by running lorax in a VM with a modified runtime-postinstall that calls a python program that outputs unicode, or with glib2-2.85.3-1.fc43 -- but I am unable to cause it to fail in the test suite. (cherry picked from commit 3a53278) Related: RHEL-121651
This allows unicode to be passed to the logfiles without raising an error. (cherry picked from commit 24d17f8) Related: RHEL-121651
This was never used in lorax, is always set to false, and now with encoding set to UTF8 for these functions it wouldn't be binary anyway. Also sets text=True in the _run_program call to startProgram, previously the old universal_newlines was set from the state of binary_output. (cherry picked from commit 42786c2) Related: RHEL-121651
We have no control over the data stream so if what we receive from the program (anaconda, or whatever) is broken the best we can do is ignore errors and not crash because of a decode error. (cherry picked from commit 56a0c3a) Resolves: RHEL-121651
Coverage Report for CI Build 24581240556Coverage decreased (-0.004%) to 44.988%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: RHEL-121651