Convert path to str

This commit is contained in:
timoxa0 2024-05-18 07:33:00 -07:00
parent b3aa49211f
commit f4c68e6bbb

View file

@ -110,6 +110,6 @@ def check_rootfs(filepath: pathlib.Path) -> bool:
magic = Magic(mime=True)
else:
raise exceptions.UnsupportedPlatform(osname)
filetype = magic.from_file(filepath.absolute())
filetype = magic.from_file(str(filepath.absolute()))
logger.debug(f"RootFS MIME type: {filetype}")
return filetype in ["application/octet-stream", "inode/blockdevice"]