Clarified initialise config function
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -137,7 +137,8 @@ def _initialise_config(config_file: str) -> None:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with open(config_file, "r"):
|
with open(config_file, "r"):
|
||||||
pass
|
# if we reach this branch then the file exists and everything is fine
|
||||||
|
return
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
with open(config_file, "w") as file:
|
with open(config_file, "w") as file:
|
||||||
parser = configparser.ConfigParser()
|
parser = configparser.ConfigParser()
|
||||||
|
|||||||
Reference in New Issue
Block a user