From: J. Alexander Treuman Date: Sun, 24 Feb 2008 23:47:32 +0000 (-0500) Subject: return an empty dict if no object is read X-Git-Tag: v0.1.0~17 X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=commitdiff_plain;h=cdd3dd21892df8bebffbbaf868b54870bccf72a1 return an empty dict if no object is read --- 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):