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

ImcVersion: Only set patch version to z if it is a spin version #211

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

mtimm
Copy link
Contributor

@mtimm mtimm commented Apr 28, 2020

In previous imcsdk versions you could do this:

from imcsdk.imccoremeta import ImcVersion
Version404 = ImcVersion("4.0(4)")

And version comparisons against this would work as expected, any patch version of 4.0(4*) would basically match this version. A >= comparison would return true for any patch version of 4.0(4*) and of course any major/minor version that was greater.

This change c8a48e3#diff-d3d8d1f12c7ff41f292412d345f9a8d1R106 causes this sort of version comparison to no longer be valid because it assumes if there is no patch version it must be a spin version and sets the patch version to z. The change in this PR removes that assumption and only sets the patch version to z if a spin version is also detected.

Also this PR attempts to protect against doing isdigit against a NoneType in the other elif statements which allows the empty patch version to function again.

Signed-off-by: Mike Timm mtimm@tetrationanalytics.com

mtimm added 2 commits April 28, 2020 09:40
… protect against doing isdigit against a NoneType

Signed-off-by: Mike Timm <mtimm@tetrationanalytics.com>
…pin versions

Signed-off-by: Mike Timm <mtimm@tetrationanalytics.com>
@vvb vvb merged commit 19bb6b6 into CiscoUcs:master Oct 28, 2021
@mtimm mtimm deleted the mtimm/fix_patch_version branch January 28, 2022 03:14
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