From: Kaliko Jack Date: Sat, 1 Apr 2023 15:22:04 +0000 (+0200) Subject: Refactor mpd_version attribute X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=56d8d1bbb75b1e6a9a83178df155e32d3b956d0c;p=python-musicpd.git Refactor mpd_version attribute --- diff --git a/musicpd.py b/musicpd.py index be9b833..f763a8e 100644 --- a/musicpd.py +++ b/musicpd.py @@ -155,6 +155,8 @@ class MPDClient: #: Current connection timeout value, defaults to #: :py:obj:`CONNECTION_TIMEOUT` or env. var. ``MPD_TIMEOUT`` if provided self.mpd_timeout: Union[None,int] = None + #: Protocol version as exposed by the server + self.mpd_version: str = '' self._reset() self._commands = { # Status Commands @@ -589,7 +591,7 @@ class MPDClient: self.mpd_version = line[len(HELLO_PREFIX):].strip() def _reset(self): - self.mpd_version = None + self.mpd_version = '' self._iterating = False self._pending = [] self._command_list = None