Skip to content
Snippets Groups Projects
  • Rafael Guterres Jeffman's avatar
    87ff15a9
    api_check_ipa_version: Fix version comparison for more than one digit · 87ff15a9
    Rafael Guterres Jeffman authored
    The fallback function used to compare IPA versions was spliting the
    version string into a tuple of strings, and the comparison of the tuple
    would fail if comparing a field with one digit aginst a two-digit one,
    for example, '8' with '10', as the string comparison would put '10'
    before the '8'.
    
    This patch forces the version fields to be converted to integers, so
    a numerical comparison will be performed. If a version string field
    cannot be converted to a number, than the string comparison will still
    be used.
    87ff15a9
    History
    api_check_ipa_version: Fix version comparison for more than one digit
    Rafael Guterres Jeffman authored
    The fallback function used to compare IPA versions was spliting the
    version string into a tuple of strings, and the comparison of the tuple
    would fail if comparing a field with one digit aginst a two-digit one,
    for example, '8' with '10', as the string comparison would put '10'
    before the '8'.
    
    This patch forces the version fields to be converted to integers, so
    a numerical comparison will be performed. If a version string field
    cannot be converted to a number, than the string comparison will still
    be used.