mirror of
https://github.com/bytequill/smallscripts.git
synced 2025-11-04 12:59:19 +01:00
🔧 Added fallback mechanism for manual token entry
This commit is contained in:
parent
6e2e5bf94a
commit
2412b53f59
@ -81,7 +81,10 @@ def main():
|
|||||||
con.print(P_CHK+"Got token from env")
|
con.print(P_CHK+"Got token from env")
|
||||||
else:
|
else:
|
||||||
con.print(P_ERR+"Could not get token from env. Create a .env with the variable DC_TOKEN")
|
con.print(P_ERR+"Could not get token from env. Create a .env with the variable DC_TOKEN")
|
||||||
|
DC_TOKEN = con.input(P_INP+"[yellow]Fallback[/yellow] Please enter the token manually. It is reccomended to verify it: ")
|
||||||
|
if not DC_TOKEN and len(DC_TOKEN) == 0:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
con.print(P_INF+"Token is "+DC_TOKEN)
|
||||||
|
|
||||||
res = prompt_bool(con,P_INP+"Do you want to verify token?", False)
|
res = prompt_bool(con,P_INP+"Do you want to verify token?", False)
|
||||||
if res:
|
if res:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user