From cdd3dd21892df8bebffbbaf868b54870bccf72a1 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sun, 24 Feb 2008 18:47:32 -0500 Subject: [PATCH] return an empty dict if no object is read --- mpd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mpd.py b/mpd.py index 2fdce12..806172e 100644 --- a/mpd.py +++ b/mpd.py @@ -1,6 +1,5 @@ #! /usr/bin/env python -# TODO: return {} if no object read (?) # TODO: implement argument checking/parsing (?) # TODO: check for EOF when reading and benchmark it # TODO: converter support @@ -231,7 +230,7 @@ class MPDClient(object): def _getobject(self): objs = list(self._readobjects()) if not objs: - return + return {} return objs[0] def _getobjects(self, delimiters): -- 2.39.5