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)