def logIn(username="", password=""): cf = TidalConfig() if username == "" or password == "": print("----------------LogIn------------------") username = myinput("username:"******"password:"******"" and account2.errmsg != "": printErr(0, account.errmsg) return False elif account.errmsg != "": account = account2 elif account2.errmsg != "": account2 = account cf.set_account(username, password, account.session_id, account.country_code, account.user_id, account2.session_id) Curtime = time.time() cf.set_lastlogintime(str(Curtime)) return True
def logIn(username="", password=""): if username == "" or password == "": print("----------------LogIn------------------") username = myinput("username:"******"password:"******"": # printErr(0, account.errmsg) # return False # if account2.errmsg != "": # printErr(0, account2.errmsg) # return False if account.errmsg != "" and account2.errmsg != "": printErr(0, account.errmsg) return False elif account.errmsg != "": account = account2 elif account2.errmsg != "": account2 = account cf = TidalConfig() cf.set_account(username, password, account.session_id, account.country_code, account.user_id, account2.session_id) Curtime = time.time() cf.set_lastlogintime(str(Curtime)) return True