strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ee4984
)
conf: Fix sorting of options with Python 3
author
Tobias Brunner
<tobias@strongswan.org>
Tue, 13 May 2014 09:10:11 +0000
(11:10 +0200)
committer
Tobias Brunner
<tobias@strongswan.org>
Tue, 13 May 2014 09:14:44 +0000
(11:14 +0200)
__cmp__() is not supported anymore with Python 3 and cmp() is deprecated.
Instead rich comparisons should be used (only __lt__() is required for
sorting).
conf/format-options.py
patch
|
blob
|
history
diff --git
a/conf/format-options.py
b/conf/format-options.py
index
5f850af
..
d046e24
100755
(executable)
--- a/
conf/format-options.py
+++ b/
conf/format-options.py
@@
-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"""