From ddddddfdb3a1ad600b79f316d50326ce3e711f07 Mon Sep 17 00:00:00 2001 From: Pierre Ayoub Date: Sun, 14 Apr 2024 17:09:44 +0200 Subject: [PATCH] Add some assertion for input of replace_ext() --- beetsplug/convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index c46b2fc85..fc9e368fa 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -49,6 +49,8 @@ def replace_ext(path, ext): The new extension must not contain a leading dot. """ + assert isinstance(path, bytes) + assert isinstance(ext, bytes) ext_dot = b"." + ext return os.path.splitext(path)[0] + ext_dot