diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-11 17:29:53 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-11 17:29:53 +0100 |
commit | 2551cc25ff5369d962514d8d4bfca127ebcfabb3 (patch) | |
tree | ae0abcb3f07621678f9dc6d479d46f428eb51033 | |
parent | d36b3fd70b9bd34719fc4d08594563ef73759ee7 (diff) |
Removes apparently redundant checks on filepath
-rw-r--r-- | pyblackbird_cc/resources/services.py | 4 |
1 files changed, 0 insertions, 4 deletions
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) |