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 6E6A81381F3 for ; Mon, 10 Jun 2013 04:01:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B7EBE0848; Mon, 10 Jun 2013 04:01:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D1224E0848 for ; Mon, 10 Jun 2013 04:01:47 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA1DD33E292 for ; Mon, 10 Jun 2013 04:01:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 21A61E468F for ; Mon, 10 Jun 2013 04:01:45 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1370836886.95ca465d2a0b30488efea0b0f76ad6191f96e25c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 95ca465d2a0b30488efea0b0f76ad6191f96e25c X-VCS-Branch: master Date: Mon, 10 Jun 2013 04:01:45 +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: c1d16701-a4ea-4911-8b52-2b369d6a5c1b X-Archives-Hash: a1c1ce3373f07fc76ddddb533dfc5330 commit: 95ca465d2a0b30488efea0b0f76ad6191f96e25c Author: Zac Medico gentoo org> AuthorDate: Mon Jun 10 04:01:26 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Jun 10 04:01:26 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=95ca465d _emerge_config: simplify __getitem__ --- pym/_emerge/actions.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 2ee2a5b..767a614 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -3140,13 +3140,7 @@ class _emerge_config(SlotObject): yield self.mtimedb def __getitem__(self, index): - if index == 0: - return self.settings - elif index == 1: - return self.trees - elif index == 2: - return self.mtimedb - raise IndexError(index) + return list(self)[index] def __len__(self): return 3