improved exception handling

pull/280/head
iaacornus 3 years ago
parent 589d427065
commit 9e3f3d7830
No known key found for this signature in database
GPG Key ID: 281739AE7252598C

@ -13,14 +13,13 @@ from moviepy.editor import (
) )
import reddit.subreddit import reddit.subreddit
from utils.console import print_step from utils.console import print_step, print_substep
W, H = 1080, 1920 W, H = 1080, 1920
def make_final_video(number_of_clips, file_name): def make_final_video(number_of_clips, file_name):
# Calls opacity from the .env
load_dotenv() load_dotenv()
opacity = os.getenv("OPACITY") opacity = os.getenv("OPACITY")
@ -57,8 +56,9 @@ def make_final_video(number_of_clips, file_name):
OSError, OSError,
FileNotFoundError, FileNotFoundError,
): ):
... print_substep("An error occured! Aborting.", style="bold red")
raise SystemExit()
else:
audio_concat = concatenate_audioclips(audio_clips) audio_concat = concatenate_audioclips(audio_clips)
audio_composite = CompositeAudioClip([audio_concat]) audio_composite = CompositeAudioClip([audio_concat])

Loading…
Cancel
Save