From ae733c4b3fb3871fe7411b8a7222fa55a5146a00 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Wed, 31 Aug 2022 14:40:20 -0400 Subject: [PATCH] [F] Fix colors --- mc_authn/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mc_authn/__init__.py b/mc_authn/__init__.py index df2625e..4d3ebd2 100644 --- a/mc_authn/__init__.py +++ b/mc_authn/__init__.py @@ -14,7 +14,7 @@ from fastapi import FastAPI from hypy_utils import ensure_dir, write, json_stringify, printc, color from ruamel import yaml -__version__ = "1.0.2" +__version__ = "1.0.3" config_path = ensure_dir(Path.home() / '.config' / 'mc-auth') access_token_path = config_path / 'data' / 'access_token.json' @@ -43,7 +43,7 @@ def get_login_code() -> str: @app.get('/') def callback(code: str): - print('Login code received!') + printc('&a> Login code received!') result['code'] = code return 'Login success! You can close this window now.' @@ -63,11 +63,11 @@ def get_login_code() -> str: 'scope': 'XboxLive.signin offline_access', 'state': 'NOT_NEEDED' }) - print(f'&6Opening {url} in the browser...') + printc(f'&6Opening {url} in the browser...') if webbrowser.open(url): - print(f'&6If the link does not open, please open it manually.') + printc(f'&6If the link does not open, please open it manually.') else: - print(f'&cFailed to open the link automatically, please open it manually.') + printc(f'&cFailed to open the link automatically, please open it manually.') while 'code' not in result: time.sleep(0.01)