def poll(self):
        """
        Called by qtile manager.

        poll the mpd server and update widget.
        """
        if self.connected:
            return self.update_status()
        else:
            return self.no_connection

        Called by qtile manager.

        poll the mpd server and update widget.
        
libqtile/widget/mpd2widget.py