Add missing exits on exceptions.

Signed-off-by: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
This commit is contained in:
Abdulkadir Furkan Şanlı 2021-11-17 12:07:07 +01:00
parent 797021bac2
commit 48ec8a4769
Signed by: afk
GPG Key ID: C8F00588EE6ED1FE

View File

@ -12,6 +12,7 @@ def connect_client(auth_token):
client.set_auth_token(auth_token) client.set_auth_token(auth_token)
except BaseException: except BaseException:
print("Unable to connect to ListenBrainz.") print("Unable to connect to ListenBrainz.")
sys.exit(1)
return client return client
@ -21,6 +22,7 @@ def open_export(export_file):
export_json = json.load(read_file) export_json = json.load(read_file)
except FileNotFoundError: except FileNotFoundError:
print("File does not exist.") print("File does not exist.")
sys.exit(1)
return export_json return export_json