Finalise should checker whether the user-provided folder exists to avoid confusion with outputs from existing sessions
jim-smith opened this issue · comments
and prompt for a new name if the folder does exist
Here in finalise:
try:
with open(config_filename, "w", newline="", encoding="utf-8") as file:
json.dump(self.config, file, indent=4, sort_keys=False)
except FileNotFoundError: # pragma: no cover
logger.debug(
"The config file will not be created because the "
"output folder was not created as the acro object was empty."
)
return self.results