This fixes a very longstanding bug where an MPD command error would raise
an exception, but not clear the command list. This would prevent further
commands from being executed until the command list was completed, which
was impossible since the MPD command error broke out of the command list
on the server side.
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):