From 7b201db5a76a40c50cee6f17bb4ca25ff96d3e27 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 15 Nov 2023 10:38:21 +0100 Subject: [PATCH] ostuild: fix new pylint error with latest pylint version The `shutil.rmtree(onerror=...)` kwarg got deprecated with py3.12. We still need to support older version of python all the way back to 3.6 so just ignore this pylint error for a while. --- osbuild/util/rmrf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osbuild/util/rmrf.py b/osbuild/util/rmrf.py index e3ee5cb3..4658b9cd 100644 --- a/osbuild/util/rmrf.py +++ b/osbuild/util/rmrf.py @@ -106,4 +106,5 @@ def rmtree(path: str): else: raise e - shutil.rmtree(path, onerror=on_error) + # "onerror" can be replaced with "onexc" once we move to python 3.12 + shutil.rmtree(path, onerror=on_error) # pylint: disable=deprecated-argument