From 7de98640722cf64c68d89d3e82067f8f9eb75a49 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Fri, 31 Mar 2023 16:59:04 +0200 Subject: [PATCH] mpd_version attribute init to empty string instead of None --- CHANGES.txt | 1 + musicpd.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2