From 2551cc25ff5369d962514d8d4bfca127ebcfabb3 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 11 Sep 2024 17:29:53 +0100 Subject: Removes apparently redundant checks on filepath --- pyblackbird_cc/resources/services.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'pyblackbird_cc/resources') diff --git a/pyblackbird_cc/resources/services.py b/pyblackbird_cc/resources/services.py index 78cef87..03c53af 100644 --- a/pyblackbird_cc/resources/services.py +++ b/pyblackbird_cc/resources/services.py @@ -19,8 +19,6 @@ def get_pdf_metadata_from_path(file_path: str) -> PDFMetadata: :param file_path: :return: PDFMetadata """ - if file_path is None: - raise ValueError("file_path cannot be None") if not os.path.isfile(file_path): raise ValueError("file_path must be a file. {file_path} is not a file.") reader = PdfReader(file_path) @@ -36,8 +34,6 @@ def export_pages_as_images(file_path: str) -> list[str]: :param file_path: :return: List of paths to the JPEG images """ - if file_path is None: - raise ValueError("file_path cannot be None") output_dir = tempfile.mkdtemp() # Create a temporary directory reader = PdfReader(file_path) n_pages = len(reader.pages) -- cgit v1.2.3