From 2cff167759f9ebcfeb6ce372bd612802378dd238 Mon Sep 17 00:00:00 2001 From: "R. M" <50295204+glomatico@users.noreply.github.com> Date: Sat, 31 Dec 2022 18:47:42 -0300 Subject: [PATCH] Raise exception instead of exit --- gamdl.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gamdl.py b/gamdl.py index de5507f..ac5660e 100644 --- a/gamdl.py +++ b/gamdl.py @@ -387,11 +387,9 @@ class Gamdl: if __name__ == '__main__': if not shutil.which('mp4decrypt'): - print('mp4decrypt is not on PATH.') - exit(1) + raise Exception('mp4decrypt is not on PATH.') if not shutil.which('MP4Box'): - print('MP4Box is not on PATH.') - exit(1) + raise Exception('MP4Box is not on PATH.') parser = ArgumentParser(description = 'A Python script to download Apple Music songs/music videos/albums/playlists.') parser.add_argument( 'url',