fix: Display ascii art on startup

This commit is contained in:
Kevin Bataille
2025-10-06 16:16:32 +02:00
parent ed7165632a
commit c073006592

19
main.py
View File

@@ -18,14 +18,6 @@ def main():
""" """
Main function to initialize the Booker and start the booking process. 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 # Set up logging
logging.basicConfig( logging.basicConfig(
level=logging.INFO, 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 # Initialize components
auth_handler = AuthHandler( auth_handler = AuthHandler(
str(os.environ.get("CROSSFIT_USERNAME")), str(os.environ.get("CROSSFIT_USERNAME")),