Skip to content
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

apt.py: use CalledProcessError.stderr in exceptions instead of output/stdout #115

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

Perfect5th
Copy link
Contributor

as mentioned in #114 , this patch changes some select PackageError exceptions to consume CalledProcessError.stderr instead of CalledProcessError.output (an alias for stdout).

These exceptions should now actually contain the error output of the subprocesses with non-zero exit codes.

@Perfect5th
Copy link
Contributor Author

Are we okay with these e.stderr being bytes? Not too hard to ensure they are strs, instead.

@benhoyt
Copy link
Collaborator

benhoyt commented Dec 15, 2023

Oh, can we add an integration test or two to ensure stderr actually appears correctly "in real life"?

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Looks good to me -- thanks for the updates!

@benhoyt benhoyt merged commit 7680b81 into canonical:main Jan 3, 2024
5 checks passed
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