From e3d0ca15a7279adfa39fcc9ac0cbac0100e677b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 29 Sep 2023 21:45:48 +0200 Subject: [PATCH] Fix FileNotFoundError in setuptools-odoo-makedefault --- newsfragments/116.bugfix | 1 + setuptools_odoo/make_default_setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 newsfragments/116.bugfix diff --git a/newsfragments/116.bugfix b/newsfragments/116.bugfix new file mode 100644 index 00000000..dad04a59 --- /dev/null +++ b/newsfragments/116.bugfix @@ -0,0 +1 @@ +Fix ``FileNotFoundError`` regression in ``setuptools-odoo-make-default``. diff --git a/setuptools_odoo/make_default_setup.py b/setuptools_odoo/make_default_setup.py index 6955114c..e48b3686 100644 --- a/setuptools_odoo/make_default_setup.py +++ b/setuptools_odoo/make_default_setup.py @@ -322,7 +322,7 @@ def clean_setup_addons_dir(addons_dir, odoo_version_override): for p in paths_to_remove: if os.path.isdir(p): shutil.rmtree(p) - else: + elif os.path.exists(p): os.unlink(p)