[Pkg-mpd-commits] [python-mpd] 61/262: mpd.py: set iterating flag before returning iterator
Simon McVittie
smcv at debian.org
Sun May 22 18:16:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch upstream
in repository python-mpd.
commit 6ab362fa29a1d5605f1540b83f13f47741272f32
Author: J. Alexander Treuman <jat at spatialrift.net>
Date: Thu Jul 15 17:26:27 2010 -0400
mpd.py: set iterating flag before returning iterator
---
mpd.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mpd.py b/mpd.py
index 8810fac..c38204e 100644
--- a/mpd.py
+++ b/mpd.py
@@ -275,7 +275,6 @@ class MPDClient(object):
self._fetch_nothing()
def _iterator_wrapper(self, iterator):
- self._iterating = True
for item in iterator:
yield item
self._iterating = False
@@ -283,6 +282,7 @@ class MPDClient(object):
def _wrap_iterator(self, iterator):
if not self.iterate:
return list(iterator)
+ self._iterating = True
return self._iterator_wrapper(iterator)
def _fetch_nothing(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list