diff --git a/src/twomartens/masterthesis/config.py b/src/twomartens/masterthesis/config.py index 996cbeb..af8ea9f 100644 --- a/src/twomartens/masterthesis/config.py +++ b/src/twomartens/masterthesis/config.py @@ -137,7 +137,8 @@ def _initialise_config(config_file: str) -> None: try: with open(config_file, "r"): - pass + # if we reach this branch then the file exists and everything is fine + return except FileNotFoundError: with open(config_file, "w") as file: parser = configparser.ConfigParser()