Skip to content

Add version-specific support utilities for RHEL-family tools#474

Open
mihaelabalutoiu wants to merge 1 commit into
cloudbase:masterfrom
mihaelabalutoiu:refactor-rhel-tools
Open

Add version-specific support utilities for RHEL-family tools#474
mihaelabalutoiu wants to merge 1 commit into
cloudbase:masterfrom
mihaelabalutoiu:refactor-rhel-tools

Conversation

@mihaelabalutoiu

@mihaelabalutoiu mihaelabalutoiu commented Jul 20, 2026

Copy link
Copy Markdown
Member

This PR introduces dynamic version detection to RHEL-family OSMorphing tools enabling support for RHEL 6-10+ through unified implementations.

Add dynamic version detection to RHEL-family OSMorphing tools, enabling
support for RHEL 6-10+ through unified implementations.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
@mihaelabalutoiu
mihaelabalutoiu marked this pull request as ready for review July 21, 2026 10:28

@petrutlucian94 petrutlucian94 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This trivial helper is worth having. If we'll ever need to parse semver and retrieve the minor version or patch version, we can use packaging.version: https://packaging.pypa.io/en/latest/version.html

if not match:
raise ValueError(
"Could not parse major version from release string: %r"
% (version,))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Passing a tuple when formatting a single value is a bit unusual but still correct. There's also the option to use format strings, e.g. f"Could not parse major version from release string: {version}"

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