Skip to content

Commit

Permalink
semver deprecation
Browse files Browse the repository at this point in the history
Use the semver.VersionInfo.compare function instead of semver.compare to address
deprecation warning.
  • Loading branch information
kruton committed May 2, 2022
1 parent 6204bfa commit 80345bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feeder/util/mqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def send_cmd_schedule(
# TODO: Actually figure out when they implemented the newer scheduling API...
# We know >=2.7 uses the new API and that 2.3.2 uses the legacy API.
# Assuming 2.5.X because that is smack dab in between 3 and 7.
if semver.compare("2.5.0", software_version) == 1:
if semver.VersionInfo.parse("2.5.0").compare(software_version) == 1:
# If we are running on 2.4.0 or lower, use the legacy scheduling API
await self.send_cmd(gateway_id, device_id, "schedule", schedule_array)
else:
Expand Down

0 comments on commit 80345bf

Please sign in to comment.