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

[RHELC-676] Unify parsing of the system release string #897

Merged
merged 3 commits into from
Apr 15, 2024

Commits on Apr 9, 2024

  1. Generic parser for system release content

    There are several places where the system release string is parsed via regular expression. These expressions are different and adjusting them requires refactoring in multiple places.
    
    This change introduces one parsing function which does a full match of the system-release string and reads all possible data points from it, and provides the result as a dictionary for later use by other tools.
    
    The function replaces three other helper methods: _get_system_name, _get_system_version and _get_system_distribution_id, which are removed.
    
    NOTE1: The parsing function could be a static method or even implemented as a utility function outside the class. The only reason why it is in the class is the logger object.
    
    NOTE2: the function overlaps with the get_system_release_info function. We should check if this needs to be further unified.
    bookwar committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    6b3da88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    736b7ec View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. Ignote type hint on re.match

    Co-authored-by: Freya Gustavsson <freya@spytec.se>
    bookwar and Venefilyn authored Apr 11, 2024
    Configuration menu
    Copy the full SHA
    1cbf6e3 View commit details
    Browse the repository at this point in the history