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@xxxxxxxxxx> --- python/sepolicy/sepolicy/gui.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py index 8e86a369..7f84b6f9 100644 --- a/python/sepolicy/sepolicy/gui.py +++ b/python/sepolicy/sepolicy/gui.py @@ -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 <<")) -- 2.12.2