From 9c09c839d9c9e8c9a0ac8a49655ef6a48eedf1cf Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Thu, 15 Jul 2010 17:27:23 -0400 Subject: [PATCH] mpd.py: don't allow command_list_end if already iterating --- mpd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpd.py b/mpd.py index c38204e..a850bb0 100644 --- a/mpd.py +++ b/mpd.py @@ -418,6 +418,8 @@ class MPDClient(object): def command_list_end(self): if self._command_list is None: raise CommandListError("Not in command list") + if self._iterating: + raise IteratingError("Already iterating over a command list") self._write_command("command_list_end") return self._fetch_command_list() -- 2.39.5