From e3e56b76a2e16774733766c3f603f652d575c04a Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Tue, 12 May 2020 02:50:19 +0530 Subject: [PATCH] Remove sys.exit from sub-modules --- spotdl/helpers/spotify.py | 3 +-- spotdl/util.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/spotdl/helpers/spotify.py b/spotdl/helpers/spotify.py index 44d2414..80dda37 100644 --- a/spotdl/helpers/spotify.py +++ b/spotdl/helpers/spotify.py @@ -11,7 +11,7 @@ try: except ImportError: logger.error("Oops! `unicode-slugify` was not found.") logger.info("Please remove any other slugify library and install `unicode-slugify`.") - sys.exit(5) + raise class SpotifyHelpers: @@ -62,7 +62,6 @@ class SpotifyHelpers: "Unable to find playlist. Make sure the playlist is set " "to publicly visible and then try again." ) - sys.exit(11) return results diff --git a/spotdl/util.py b/spotdl/util.py index 53a2a24..85ebe4f 100644 --- a/spotdl/util.py +++ b/spotdl/util.py @@ -18,7 +18,7 @@ try: except ImportError: logger.error("Oops! `unicode-slugify` was not found.") logger.info("Please remove any other slugify library and install `unicode-slugify`") - sys.exit(5) + raise # This has been referred from