diff --git a/main.py b/main.py index 883cd9b..8c7ff5e 100644 --- a/main.py +++ b/main.py @@ -51,16 +51,15 @@ async def main() -> None: try: with open('texlily.yaml', 'r') as conf: config = yaml.safe_load(conf) - # if config file does not exist, quit - except FileNotFoundError: - print("No config file found.\nPlease create a file named `texlily.yaml` and read the README file.") - quit() - try: # Retrieve our configuration homeserver = str(config["homeserver"]) user = str(config["user"]) token = str(config["token"]) # path = str(config["path"]) # not used + # if config file does not exist, quit + except FileNotFoundError: + print("No config file found.\nPlease create a file named `texlily.yaml` and read the README file.") + quit() except TypeError: print("Invalid configuration file.") quit()