From 48ec8a47698e6e1a0cca5866c5f78f3b0a5107f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdulkadir=20Furkan=20=C5=9Eanl=C4=B1?= Date: Wed, 17 Nov 2021 12:07:07 +0100 Subject: [PATCH] Add missing exits on exceptions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Abdulkadir Furkan Şanlı --- lb_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lb_import.py b/lb_import.py index e1af736..e948e9a 100755 --- a/lb_import.py +++ b/lb_import.py @@ -12,6 +12,7 @@ def connect_client(auth_token): client.set_auth_token(auth_token) except BaseException: print("Unable to connect to ListenBrainz.") + sys.exit(1) return client @@ -21,6 +22,7 @@ def open_export(export_file): export_json = json.load(read_file) except FileNotFoundError: print("File does not exist.") + sys.exit(1) return export_json