]> kaliko git repositories - python-musicpd.git/blobdiff - mpd.py
CHANGES.txt: adding changes in prep for 0.3.0 release
[python-musicpd.git] / mpd.py
diff --git a/mpd.py b/mpd.py
index a850bb03da5c50fa1f6d8baa7fe51b23e117309c..5e50295df30acb0523d84f5fedd5dfe77048310e 100644 (file)
--- a/mpd.py
+++ b/mpd.py
@@ -269,15 +269,19 @@ class MPDClient(object):
             yield obj
 
     def _read_command_list(self):
-        for retval in self._command_list:
-            yield retval()
-        self._command_list = None
+        try:
+            for retval in self._command_list:
+                yield retval()
+        finally:
+            self._command_list = None
         self._fetch_nothing()
 
     def _iterator_wrapper(self, iterator):
-        for item in iterator:
-            yield item
-        self._iterating = False
+        try:
+            for item in iterator:
+                yield item
+        finally:
+            self._iterating = False
 
     def _wrap_iterator(self, iterator):
         if not self.iterate: