From: Kaliko Jack Date: Fri, 31 Mar 2023 14:59:04 +0000 (+0200) Subject: mpd_version attribute init to empty string instead of None X-Git-Tag: v0.9.0~30 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=7de98640722cf64c68d89d3e82067f8f9eb75a49;p=python-musicpd.git mpd_version attribute init to empty string instead of None --- diff --git a/CHANGES.txt b/CHANGES.txt index bb6a6ac..61ba1ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ Changes in 0.9.0 ---------------- * Use right SPDX identifier for license headers + * mpd_version attribute init to empty string instead of None Changes in 0.8.0 ---------------- diff --git a/musicpd.py b/musicpd.py index d2e6ebf..50c35dd 100644 --- a/musicpd.py +++ b/musicpd.py @@ -152,6 +152,10 @@ class MPDClient: #: Current connection timeout value, defaults to #: :py:obj:`CONNECTION_TIMEOUT` or env. var. ``MPD_TIMEOUT`` if provided self.mpd_timeout = None + self.mpd_version = '' + """Protocol version as exposed by the server as a :py:obj:`str` + + .. note:: This is the version of the protocol spoken, not the real version of the daemon.""" self._reset() self._commands = { # Status Commands @@ -585,7 +589,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