Skip to content

Commit

Permalink
Update the CiscoInterface() __gt__() and __lt__() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 13, 2023
1 parent 37503a8 commit 18cd2b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ciscoconfparse/ccp_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3069,13 +3069,13 @@ def __eq__(self, other):

def __gt__(self, other):
# Ref: http://stackoverflow.com/a/7152796/667301
if self.__hash__() > other.__hash__():
if self.sort_list > other.sort_list:
return True
return False

def __lt__(self, other):
# Ref: http://stackoverflow.com/a/7152796/667301
if self.__hash__() < other.__hash__():
if self.sort_list < other.sort_list:
return True
return False

Expand Down

0 comments on commit 18cd2b6

Please sign in to comment.