Reprompt when no input given

This commit is contained in:
Jared Rossberg
2021-10-23 17:17:04 -06:00
parent 630752cfa6
commit 509dbb1e45
2 changed files with 9 additions and 3 deletions

View File

@@ -43,7 +43,9 @@ class ZSpotify:
except RuntimeError:
pass
while True:
user_name = input('Username: ')
user_name = ''
while len(user_name) == 0:
user_name = input('Username: ')
password = getpass()
try:
cls.SESSION = Session.Builder().user_pass(user_name, password).create()