From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5AC85138BED for ; Sat, 24 Oct 2015 06:58:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22900E07E0; Sat, 24 Oct 2015 06:58:28 +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 B254DE07E0 for ; Sat, 24 Oct 2015 06:58:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9710F340B50 for ; Sat, 24 Oct 2015 06:58:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0FF321743 for ; Sat, 24 Oct 2015 06:58:21 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1444616297.986ef3f2a80c688059840d781d962bd3f3644538.vapier@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/genbase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 986ef3f2a80c688059840d781d962bd3f3644538 X-VCS-Branch: master Date: Sat, 24 Oct 2015 06:58:21 +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: 55a2c2b8-766c-4ac2-a085-6c7e44f318c8 X-Archives-Hash: f3f06e9ed8770cc46d68fde215e2de2d commit: 986ef3f2a80c688059840d781d962bd3f3644538 Author: Mike Frysinger gentoo org> AuthorDate: Mon Oct 12 02:18:17 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Oct 12 02:18:17 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=986ef3f2 genbase: use sorted() with dict keys In py3, the dict keys func returns a view which doesn't have a sort member. Pass the result through sorted() which works with py2 and py3. catalyst/base/genbase.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py index a33f924..8a1af8d 100644 --- a/catalyst/base/genbase.py +++ b/catalyst/base/genbase.py @@ -22,8 +22,7 @@ class GenBase(object): keys={} for i in self.settings["contents"].split(): keys[i]=1 - array=keys.keys() - array.sort() + array = sorted(keys.keys()) for j in array: contents = contents_map.contents(path, j, verbose=self.settings["VERBOSE"]) @@ -42,8 +41,7 @@ class GenBase(object): keys={} for i in self.settings["digests"].split(): keys[i]=1 - array=keys.keys() - array.sort() + array = sorted(keys.keys()) for f in [path, path + '.CONTENTS']: if os.path.exists(f): if "all" in array: