]> kaliko git repositories - python-musicpd.git/commitdiff
return an empty dict if no object is read
authorJ. Alexander Treuman <jat@spatialrift.net>
Sun, 24 Feb 2008 23:47:32 +0000 (18:47 -0500)
committerJ. Alexander Treuman <jat@spatialrift.net>
Sun, 24 Feb 2008 23:47:32 +0000 (18:47 -0500)
mpd.py

diff --git a/mpd.py b/mpd.py
index 2fdce12620d406e9f90597a3118d617cac270015..806172e271e10c3dab7cb41899779ac2c8aa1e2c 100644 (file)
--- 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):