From: Joerg Behrmann Date: Tue, 7 Sep 2021 15:20:54 +0000 (+0200) Subject: mkosi: change str(Path) to os.fspath(Path) X-Git-Tag: v11~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F788%2Fhead;p=thirdparty%2Fmkosi.git mkosi: change str(Path) to os.fspath(Path) os.fspath calls the appropriate protocol instead of using the potentially lossy string representation --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index be09aa131..6bdad04af 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -7251,7 +7251,7 @@ def prepend_to_environ_path(paths: List[Path]) -> None: if not paths: return - news = [str(path) for path in paths] + news = [os.fspath(path) for path in paths] olds = os.getenv("PATH", "").split(":") os.environ["PATH"] = ":".join(news + olds)