From cb64c34c220cac30744cb1fc434a0d88eb0d9fd0 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 27 Nov 2010 09:24:32 +0200 Subject: [PATCH] Simplify arch-sorting key lambda --- wrap-and-sort | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap-and-sort b/wrap-and-sort index 1e43081..005fad1 100755 --- a/wrap-and-sort +++ b/wrap-and-sort @@ -67,7 +67,7 @@ class Control(object): if "Architecture" in paragraph: archs = set(paragraph["Architecture"].split()) # Sort, with wildcard entries (such as linux-any) first: - archs = sorted(archs, key=lambda x: (1 - int("any" in x), x)) + archs = sorted(archs, key=lambda x: ("any" not in x, x)) paragraph["Architecture"] = " ".join(archs) if sort_paragraphs: