From: Zac Medico Date: Fri, 30 May 2008 20:46:05 +0000 (-0000) Subject: For consistency, make sure that a normal iterator is always returned X-Git-Tag: v2.2_pre8~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=155c9cef11b4d9619426e35d407ccdafbed856ee;p=portage.git For consistency, make sure that a normal iterator is always returned from dbapi._iter_match() (and never a list). This way the caller can be sure that the returned object has a next() method. svn path=/main/trunk/; revision=10507 --- diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 064309cf8..ba37c867e 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -126,7 +126,7 @@ class dbapi(object): self.cp_list(mydep.cp, use_cache=use_cache))) def _iter_match(self, atom, cpv_iter): - cpv_iter = match_from_list(atom, cpv_iter) + cpv_iter = iter(match_from_list(atom, cpv_iter)) if atom.slot: cpv_iter = self._iter_match_slot(atom, cpv_iter) if atom.use: