mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
conf: Fix sorting of options with Python 3
__cmp__() is not supported anymore with Python 3 and cmp() is deprecated. Instead rich comparisons should be used (only __lt__() is required for sorting).
This commit is contained in:
parent
5ee4984da5
commit
35952dc13f
@ -67,8 +67,8 @@ class ConfigOption:
|
||||
self.desc = []
|
||||
self.options = []
|
||||
|
||||
def __cmp__(self, other):
|
||||
return cmp(self.name, other.name)
|
||||
def __lt__(self, other):
|
||||
return self.name < other.name
|
||||
|
||||
def add_paragraph(self):
|
||||
"""Adds a new paragraph to the description"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user