Skip to content

Commit

Permalink
Device: Use LegacyVersion instead of Version
Browse files Browse the repository at this point in the history
Many NOS use what packaging.version calls LegacyVersion in their
version numbering model, such as EOS' 4.23.1M. Without treating these
as legacy version number format, device show with version with an
operators such as "<, >,.." fails. This patch therefore switches the
version compare to LegacyVersion.
  • Loading branch information
ddutt committed Oct 18, 2021
1 parent 62a006c commit b82e484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suzieq/engines/pandas/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get(self, **kwargs):
break

df = df.loc[df.version.apply(
lambda x: op(version.parse(x), version.parse(os_version)))]
lambda x: op(version.LegacyVersion(x), version.LegacyVersion(os_version)))]

df = self._handle_user_query_str(df, user_query)

Expand Down

0 comments on commit b82e484

Please sign in to comment.