From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B807A1381FA for ; Fri, 16 May 2014 01:07:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1E44EE0AAB; Fri, 16 May 2014 01:07:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5737DE0AB1 for ; Fri, 16 May 2014 01:07:09 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 40F0934006C for ; Fri, 16 May 2014 01:07:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E2DA7182D5 for ; Fri, 16 May 2014 01:07:06 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1400202406.f4f8b47f13fdf016a2dde788f496322446b407cc.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/makeconf.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: f4f8b47f13fdf016a2dde788f496322446b407cc X-VCS-Branch: gsoc2014 Date: Fri, 16 May 2014 01:07:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 939464ea-e090-428e-8264-5adc93000382 X-Archives-Hash: 601013c53ba0f70f55a33eeb3cf36c2e commit: f4f8b47f13fdf016a2dde788f496322446b407cc Author: Devan Franchini gentoo org> AuthorDate: Wed May 14 21:28:10 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Fri May 16 01:06:46 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=f4f8b47f layman/makeconf.py: Implements cmp_to_key on prio_sort To ensure py2/py3 compat, the cmp_to_key function has been used to the convert the variable prio_sort to a key instead of a comparison like py3 returns prio_sort to be. --- layman/makeconf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layman/makeconf.py b/layman/makeconf.py index b592fc0..d8f0015 100644 --- a/layman/makeconf.py +++ b/layman/makeconf.py @@ -20,6 +20,7 @@ import codecs import re from layman.utils import path +from layman.compatibility import cmp_to_key #=============================================================================== # @@ -246,7 +247,7 @@ class MakeConf: return 1 return 0 - self.overlays.sort(prio_sort) + self.overlays.sort(key=cmp_to_key(prio_sort)) paths = [] for i in self.overlays: