mirror of
https://github.com/beetbox/beets.git
synced 2026-03-31 10:44:16 +02:00
Add some assertion for input of replace_ext()
This commit is contained in:
parent
e3e47618f9
commit
ddddddfdb3
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue