Skip to content
Snippets Groups Projects

Use `logging.error` for error message

Merged Hans Fangohr requested to merge use-logging.error-to-report-error into main
1 file
+ 1
3
Compare changes
  • Side-by-side
  • Inline
@@ -1103,9 +1103,7 @@ def initialise_environment(root_dir: Path) -> None:
# check if the root_dir is not already initialized
init_file = root_dir / config_vars["init_file"]
if init_file.exists():
logging.getLogger("print").info(
f"Error: Directory {str(root_dir)} is already initialized."
)
logging.error(f"Directory {str(root_dir)} is already initialised.")
sys.exit(30)
else:
# create the init file
Loading