Clarified initialise config function

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-09-02 13:00:19 +02:00
parent ad96c5b156
commit afdf7c96aa

View File

@ -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()