]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Define bogus variable to work around pyright stupidity
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Jun 2022 13:21:02 +0000 (15:21 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Jun 2022 17:00:00 +0000 (19:00 +0200)
mkosi/__init__.py

index 32c862b050d34713e1e76efde517f98a2e312784..1bf8f36ec91aa56f7d7d3eeb0c112cc16cddd13c 100644 (file)
@@ -1955,15 +1955,15 @@ def clean_paths(
         always: bool) -> None:
     """Remove globs under root if always or if tool is not found under root."""
 
-    tool = root / tool.lstrip('/')
-    cond = always or not os.access(tool, os.F_OK, follow_symlinks=False)
+    toolp = root / tool.lstrip('/')
+    cond = always or not os.access(toolp, os.F_OK, follow_symlinks=False)
 
     paths = flatten(root.glob(glob.lstrip('/')) for glob in globs)
 
     if not cond or not paths:
         return
 
-    with complete_step(f"Cleaning {tool.name} metadata…"):
+    with complete_step(f"Cleaning {toolp.name} metadata…"):
         for path in paths:
             unlink_try_hard(path)