]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
mkosi: change str(Path) to os.fspath(Path) 788/head
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 7 Sep 2021 15:20:54 +0000 (17:20 +0200)
committerJoerg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 7 Sep 2021 19:58:40 +0000 (21:58 +0200)
os.fspath calls the appropriate protocol instead of using the potentially lossy
string representation

mkosi/__init__.py

index be09aa131537148f9c0111b1c497c62011fcc4d1..6bdad04afd6e56884359f871006becc79d93d901 100644 (file)
@@ -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)