From 3ffb60b7c8bce3fad4a2c284e0c68321574ba5e9 Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Fri, 9 Jun 2023 10:36:45 +0200 Subject: [PATCH] setup: styling: Fix last occurrence of os.path in favour of pathlib Commit e749b4cf forgot to update a couple more occurrences. Fixes: e749b4cf111bcfc9ceeb88be57dc1d810fc631d9 Signed-off-by: Erik Skultety --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ceb1320..5f1c3a1 100755 --- a/setup.py +++ b/setup.py @@ -338,7 +338,7 @@ class my_clean(Command): pass def run(self): - if os.path.exists("build"): + if Path("build").exists(): shutil.rmtree("build", ignore_errors=True) @@ -355,8 +355,7 @@ MIN_LIBVIRT_LXC = "1.0.2" # Hack to stop "pip install" failing with error # about missing "build" dir. -if not os.path.exists("build"): - os.mkdir("build") +Path("build").mkdir(exist_ok=True) check_pkgcfg()