Skip to content

polyfills: os.waitstatus_to_exitcode() for <3.9#22916

Merged
allisonkarlitskaya merged 1 commit intocockpit-project:mainfrom
allisonkarlitskaya:waitstatus_to_exitcode
Feb 24, 2026
Merged

polyfills: os.waitstatus_to_exitcode() for <3.9#22916
allisonkarlitskaya merged 1 commit intocockpit-project:mainfrom
allisonkarlitskaya:waitstatus_to_exitcode

Conversation

@allisonkarlitskaya
Copy link
Member

Move the open-coded waitstatus_to_exitcode() logic from transports.py into polyfills.py as suggested by Martin.

Closes #22915

Move the open-coded waitstatus_to_exitcode() logic from transports.py
into polyfills.py as suggested by Martin.

We adjust the code a little bit to match the actual stdlib
implementation which means we have to catch ValueError at the call site.

Closes cockpit-project#22915
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Cheers!

@allisonkarlitskaya allisonkarlitskaya merged commit 0c10eca into cockpit-project:main Feb 24, 2026
93 of 94 checks passed
@allisonkarlitskaya allisonkarlitskaya deleted the waitstatus_to_exitcode branch February 24, 2026 10:31
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.

Agreed to do the polyfill of os.waitstatus_to_exitcode() as a separate issue so that we can land this and unbreak main.

2 participants