Add missing exits on exceptions.
Signed-off-by: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
This commit is contained in:
parent
797021bac2
commit
48ec8a4769
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user