J. Alexander Treuman [Sun, 23 Mar 2008 19:50:48 +0000 (15:50 -0400)]
mpd.py: raise ConnectionError when trying to use an unconnected socket
ConnectionError will now be raised when trying to read from/write to a
socket before calling connect() or after calling disconnect(). In the past
it would try to complete the operation on the unconnected socket, resulting
in a socket.error exception.
J. Alexander Treuman [Sat, 1 Mar 2008 20:03:47 +0000 (15:03 -0500)]
mpd.py: making _getitem return None if no item is returned
update and addid should normally always return a single item, so previously
an exception was raised if we got nothing. However, when used in a
command_list, only the *last* call to update will return an item. So
return None instead of raising an exception if we get nothing.
J. Alexander Treuman [Mon, 25 Feb 2008 00:43:53 +0000 (19:43 -0500)]
remove argument checking/parsing TODO item
mpd already does a much better job of validating arguments than we ever
could, so no point in us doing it too. Parsing arguments is also rather
pointless, as all arguments are coerced to strings before escaping anyway.