From 595f3bd37fccfbce35676f9bb142a63024bd84c8 Mon Sep 17 00:00:00 2001 From: Matthias Blankertz Date: Sun, 9 Nov 2025 16:33:33 +0100 Subject: [PATCH] fix(db): Fix type check in BTreeDB.getSetting Fix missing type() call in type check. Also remove leftover debug print(). Signed-off-by: Matthias Blankertz --- software/src/utils/playlistdb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/software/src/utils/playlistdb.py b/software/src/utils/playlistdb.py index 3f7914a..01ecd60 100644 --- a/software/src/utils/playlistdb.py +++ b/software/src/utils/playlistdb.py @@ -209,7 +209,6 @@ class BTreeDB(IPlaylistDB): if len(elements) >= 2 and elements[1] == b'playlist': last = k break - print(last) elements = last.split(b'/') if len(elements) != 3: raise RuntimeError("Malformed playlist key") @@ -273,7 +272,7 @@ class BTreeDB(IPlaylistDB): return self.getPlaylistForTag(tag) def getSetting(self, key: bytes | str) -> str: - if key is str: + if type(key) is str: key = key.encode() return self.db.get(b'settings/' + key, self.DEFAULT_SETTINGS[key]).decode()