Fix challenge file arg support

This commit is contained in:
hyugogirubato 2024-07-08 19:02:52 +02:00
parent 349b33dc64
commit be482c08d8
1 changed files with 5 additions and 5 deletions

View File

@ -86,12 +86,12 @@ class Cdm:
Args:
data (Union[Path, bytes]): The challenge data as a file path or bytes.
"""
try:
if isinstance(data, Path):
if not data.is_file():
raise FileNotFoundError(data)
data = data.read_bytes()
try:
signed_message = SignedMessage()
signed_message.ParseFromString(data)