projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ec23b6
)
_emerge_config: simplify __getitem__
author
Zac Medico
<zmedico@gentoo.org>
Mon, 10 Jun 2013 04:01:26 +0000
(21:01 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 10 Jun 2013 04:01:26 +0000
(21:01 -0700)
pym/_emerge/actions.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/actions.py
b/pym/_emerge/actions.py
index 2ee2a5bb36592519b140c56368b72f38ce82a198..767a61477d4777d39c6107f9da7ec754015c54dc 100644
(file)
--- 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