diff --git a/main.py b/main.py index 86bd23a..300232e 100755 --- a/main.py +++ b/main.py @@ -18,14 +18,6 @@ def main(): """ Main function to initialize the Booker and start the booking process. """ - # Display ASCII art and username - with open('ascii.md', 'r') as f: - ascii_art = f.read() - print(ascii_art) - username = os.environ.get("CROSSFIT_USERNAME") - print(f"Username: {username}") - print() - # Set up logging logging.basicConfig( level=logging.INFO, @@ -35,6 +27,17 @@ def main(): ] ) + # Display ASCII art and username + try: + with open('ascii.md', 'r') as f: + ascii_art = f.read() + print(ascii_art, flush=True) + username = os.environ.get("CROSSFIT_USERNAME") + print(f"Username: {username}", flush=True) + print(flush=True) + except Exception as e: + logging.error(f"Error displaying ASCII: {e}") + # Initialize components auth_handler = AuthHandler( str(os.environ.get("CROSSFIT_USERNAME")),