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)
|
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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user