get_file now raises FileNotFoundError instead of FileExistError

This commit is contained in:
2025-08-12 10:42:58 +03:00
parent c9f3c09fdd
commit 7753eceb3b
+2 -2
View File
@@ -241,7 +241,7 @@ class AsyncVikingClient:
File: The file information. File: The file information.
Raises: Raises:
FileExistsError: If the file does not exist. FileNotFoundError: If the file does not exist.
""" """
file_hash = self._get_file_hash(file) file_hash = self._get_file_hash(file)
@@ -260,7 +260,7 @@ class AsyncVikingClient:
downloads=api_response_json.get("downloads") downloads=api_response_json.get("downloads")
) )
else: else:
raise FileExistsError(f"File {file_hash} does not exist") raise FileNotFoundError(f"File {file_hash} does not exist")
async def rename_file(self, file: File | str, new_filename: str): async def rename_file(self, file: File | str, new_filename: str):
""" """