From c886ccf603ee8e56ff7ca769fd70558ec297b88d Mon Sep 17 00:00:00 2001 From: Manveer Basra Date: Tue, 30 Oct 2018 16:38:15 -0400 Subject: [PATCH] Refactored to pass tests --- spotdl/spotify_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotdl/spotify_tools.py b/spotdl/spotify_tools.py index 0349c0f..1e27674 100644 --- a/spotdl/spotify_tools.py +++ b/spotdl/spotify_tools.py @@ -17,7 +17,7 @@ spotify = None def generate_token(): """ Generate the token. """ - if const.args.spotify_client_id and const.args.spotify_client_secret: + if const.args is not None and const.args.spotify_client_id and const.args.spotify_client_secret: credentials = oauth2.SpotifyClientCredentials( client_id=const.args.spotify_client_id, client_secret=const.args.spotify_client_secret,