From d26b1cfe461764874ff92954130238edb84fb5cc Mon Sep 17 00:00:00 2001 From: Lukas Kucharczyk Date: Fri, 2 Aug 2024 17:24:34 +0200 Subject: [PATCH] Don't panic when .arl is not writable --- deemix/__main__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deemix/__main__.py b/deemix/__main__.py index 39a878a..cd49ea9 100644 --- a/deemix/__main__.py +++ b/deemix/__main__.py @@ -48,8 +48,11 @@ def download(url, bitrate, portable, path): arl = f.readline().rstrip("\n").strip() if not dz.login_via_arl(arl): arl = requestValidArl() else: arl = requestValidArl() - with open(configFolder / '.arl', 'w', encoding="utf-8") as f: - f.write(arl) + try: + with open(configFolder / '.arl', 'w', encoding="utf-8") as f: + f.write(arl) + except: + print(f"Error opening {configFolder / '.arl'}, continuing anyway.") plugins = {} if Spotify: