From: Zac Medico Date: Mon, 10 Jun 2013 04:01:26 +0000 (-0700) Subject: _emerge_config: simplify __getitem__ X-Git-Tag: v2.2.0_alpha180~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95ca465d2a0b30488efea0b0f76ad6191f96e25c;p=portage.git _emerge_config: simplify __getitem__ --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 2ee2a5bb3..767a61477 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