From 0f554d2f31bf122cf6d661451317d9972f0c8e23 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 9 Dec 2023 13:05:51 +0200 Subject: [PATCH] PyLint fixes --- platformio/fs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformio/fs.py b/platformio/fs.py index 27d25a59..d6e1e676 100644 --- a/platformio/fs.py +++ b/platformio/fs.py @@ -223,5 +223,6 @@ def rmtree(path): err=True, ) - kwargs = {"onexc" if sys.version_info >= (3, 12) else "onerror": _onexc} - return shutil.rmtree(path, **kwargs) + if sys.version_info < (3, 12): + return shutil.rmtree(path, onerror=_onexc) + return shutil.rmtree(path, onexc=_onexc) # pylint: disable=unexpected-keyword-arg