[Pkg-mpd-commits] [python-mpd] 03/262: return an empty dict if no object is read

Simon McVittie smcv at debian.org
Sun May 22 18:16:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit cdd3dd21892df8bebffbbaf868b54870bccf72a1
Author: J. Alexander Treuman <jat at spatialrift.net>
Date:   Sun Feb 24 18:47:32 2008 -0500

    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):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list