-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[master] Decode oscap byte stream to string #66234
base: master
Are you sure you want to change the base?
Conversation
(_, error) = proc.communicate() | ||
error = error.decode("ascii", errors="ignore") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Salt is supposed to treat all output as text, and non binary output, then why not fix the subprocess call?
ret = subprocess.run(cmd_opts, capture_output=True, text=True)
error = ret.stderr
etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module is being removed from the master branch as a community maintained extension.
What does this PR do?
In the openscap module, we send non-escaped byte error stream from the oscap output to salt-master. However, the error stream may contain non-ascii characters, which Uyuni cannot process further. This means that user doesn't see any errors in the UI, just decoding exceptions in the logs.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.