From 56d8d1bbb75b1e6a9a83178df155e32d3b956d0c Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Sat, 1 Apr 2023 17:22:04 +0200 Subject: [PATCH] Refactor mpd_version attribute --- musicpd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5