X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=mpd.py;h=315c26210a6877bd31fe8af25055a0342f093651;hp=cb16701872c5b700bc44620eb415780e7715e64c;hb=ed08fb69e46350ead2bc7f078b0378c2227cdf11;hpb=461fe7b8248ef8e26f3c6119a70ef8f0336d033b diff --git a/mpd.py b/mpd.py index cb16701..315c262 100644 --- a/mpd.py +++ b/mpd.py @@ -1,5 +1,5 @@ # Python MPD client library -# Copyright (C) 2008 J. Alexander Treuman +# Copyright (C) 2008-2010 J. Alexander Treuman # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -389,6 +389,11 @@ class MPDClient(object): self._sock.close() self._reset() + def fileno(self): + if not self._sock: + raise ConnectionError("Not connected") + return self._sock.fileno() + def command_list_ok_begin(self): if self._command_list is not None: raise CommandListError("Already in command list")