From: Daan De Meyer Date: Thu, 24 Aug 2023 10:22:42 +0000 (+0200) Subject: Use logging instead of print() X-Git-Tag: v16~40^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4fd6411705e4457317e5baf1d2e90b8d246a5b3;p=thirdparty%2Fmkosi.git Use logging instead of print() --- diff --git a/mkosi/config.py b/mkosi/config.py index 3b073e82d..b5e899f42 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -10,6 +10,7 @@ import fnmatch import functools import graphlib import inspect +import logging import operator import os.path import platform @@ -1852,15 +1853,15 @@ class MkosiConfigParser: # is no longer needed in build infrastructure (e.g.: OBS). if getattr(namespace, "nspawn_keep_unit", None): delattr(namespace, "nspawn_keep_unit") - print("Warning: --nspawn-keep-unit is no longer supported") + logging.warning("--nspawn-keep-unit is no longer supported") if getattr(namespace, "default", None): delattr(namespace, "default") - print("Warning: --default is no longer supported") + logging.warning("--default is no longer supported") if getattr(namespace, "cache", None): delattr(namespace, "cache") - print("Warning: --cache is no longer supported") + logging.warning("--cache is no longer supported") def resolve_deps(self, args: MkosiArgs, presets: Sequence[MkosiConfig]) -> list[MkosiConfig]: graph = {p.preset: p.dependencies for p in presets}