Raise exception on file not found

This commit is contained in:
Austin Mroz
2023-12-30 17:50:34 -06:00
parent 6fb8373652
commit 91c60e37ea
+1 -1
View File
@@ -537,7 +537,7 @@ class VideoPathMetaExtraction:
def process_video_file(self, video_file_path):
# Check if the file exists
if not os.path.exists(video_file_path):
return ("File not found", {})
raise Exception(f"File not found: {video_file_path}")
# Extract metadata from the video
metadata = self.extract_metadata(video_file_path)