diff --git a/acl_loader/main.py b/acl_loader/main.py index 921718f..667e449 100644 --- a/acl_loader/main.py +++ b/acl_loader/main.py @@ -826,11 +826,7 @@ def pop_matches(val): raw_data.append([priority, rule_data]) - def cmp_rules(a, b): - return cmp(a[0], b[0]) - - raw_data.sort(cmp_rules) - raw_data.reverse() + raw_data.sort(key=lambda x: x[0], reverse=True) data = [] for _, d in raw_data: