mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-24 03:59:41 +00:00
policycoreutils/sepolicy: Define our own cmp()
Fixes: Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/sepolicy/gui.py", line 1447, in stripsort return cmp(val1, val2) NameError: name 'cmp' is not defined Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
d9c2a15831
commit
4a7de9ffdc
@ -69,8 +69,14 @@ enabled = [_("No"), _("Yes")]
|
||||
action = [_("Disable"), _("Enable")]
|
||||
|
||||
|
||||
def compare(a, b):
|
||||
return cmp(a.lower(), b.lower())
|
||||
def cmp(a, b):
|
||||
if a is None and b is None:
|
||||
return 0
|
||||
if a is None:
|
||||
return -1
|
||||
if b is None:
|
||||
return 1
|
||||
return (a > b) - (a < b)
|
||||
|
||||
import distutils.sysconfig
|
||||
ADVANCED_LABEL = (_("Advanced >>"), _("Advanced <<"))
|
||||
|
Loading…
Reference in New Issue
Block a user