Skip to content

Hotfix - Compare versions appropriately instead of string comparison#223

Merged
marksull merged 11 commits intomarksull:masterfrom
manofcolombia:hotfix_version_checking
Jan 30, 2026
Merged

Hotfix - Compare versions appropriately instead of string comparison#223
marksull merged 11 commits intomarksull:masterfrom
manofcolombia:hotfix_version_checking

Conversation

@manofcolombia
Copy link
Copy Markdown
Contributor

All functionality is broken for FMC 10+ due to the way that FMC supported versioning is currently being compared via string comparison.

if self.fmc.serverVersion < self.FIRST_SUPPORTED_FMC_VERSION:

Introduced a new package: "packaging". This is to make it easy to compare string versions against each other accurately.

This resolves #222 and any other FMC 10+ deployment.

Essentially replaced every instance of:

self.fmc.serverVersion < self.FIRST_SUPPORTED_FMC_VERSION

with:

Version(self.fmc.serverVersion.split(" ")[0]) < Version(self.FIRST_SUPPORTED_FMC_VERSION)

The on the fly split handles "x.x.x (build x)" as the extra build info is not needed for this comparison.

Copy link
Copy Markdown
Owner

@marksull marksull left a comment

Choose a reason for hiding this comment

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

Appreciate the fix, thanks

@marksull marksull merged commit 94b9837 into marksull:master Jan 30, 2026
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.

fmcapi does not handle properly requests to latest cdFMC version due to version check

2 participants