_emerge_config: implement __iter__
authorZac Medico <zmedico@gentoo.org>
Mon, 10 Jun 2013 03:50:16 +0000 (20:50 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 10 Jun 2013 03:50:16 +0000 (20:50 -0700)
pym/_emerge/actions.py

index c7139d4c31b100c7f4398acb57585f037379225e..2ee2a5bb36592519b140c56368b72f38ce82a198 100644 (file)
@@ -3134,6 +3134,11 @@ class _emerge_config(SlotObject):
        __slots__ = ('action', 'args', 'mtimedb', 'opts', 'settings', 'trees')
 
        # Support unpack as tuple, for load_emerge_config backward compatibility.
+       def __iter__(self):
+               yield self.settings
+               yield self.trees
+               yield self.mtimedb
+
        def __getitem__(self, index):
                if index == 0:
                        return self.settings