ImcVersion: Only set patch version to z if it is a spin version #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In previous imcsdk versions you could do this:
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