public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
Date: Sat, 21 Nov 2015 01:33:44 +0000 (UTC)	[thread overview]
Message-ID: <1444616297.986ef3f2a80c688059840d781d962bd3f3644538.dolsen@gentoo> (raw)

commit:     986ef3f2a80c688059840d781d962bd3f3644538
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 02:18:17 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> 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:


             reply	other threads:[~2015-11-21  1:33 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21  1:33 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-11-29 17:20 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-11-29 17:20 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-11-22 15:52 Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-11  9:35 Brian Dolbec
2017-03-11  7:07 Brian Dolbec
2017-03-11  7:07 Brian Dolbec
2017-03-09 10:02 Brian Dolbec
2017-03-09 10:02 Brian Dolbec
2017-03-09  9:39 Brian Dolbec
2017-03-09  9:39 Brian Dolbec
2015-11-21  1:33 Brian Dolbec
2015-11-21  1:33 Brian Dolbec
2015-11-21  1:33 Brian Dolbec
2015-11-20 21:26 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21  1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-11-09  4:47 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21  1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-10-31 20:35 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21  1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-10-31 20:35 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21  1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-08 14:14 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-08 14:14 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:14 Brian Dolbec
2015-09-06 21:18 Brian Dolbec
2015-09-04 15:20 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2015-06-15 20:25 Brian Dolbec
2015-05-24  0:08 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-21 23:53 Brian Dolbec
2015-05-21 23:53 Brian Dolbec
2015-05-21 23:53 Brian Dolbec
2015-02-26 22:18 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-02-26 20:44 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-01-01  5:59 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444616297.986ef3f2a80c688059840d781d962bd3f3644538.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox