From 597ff8774e505803a565d9bebde2f8a48519b033 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 27 Feb 2022 18:57:50 +0000 Subject: Just check for if destination file exists --- setuptools/command/easy_install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 80ff6347..6da39e73 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -922,8 +922,9 @@ class easy_install(Command): ensure_directory(destination) dist = self.egg_distribution(egg_path) - both_exist = os.path.exists(egg_path) and os.path.exists(destination) - if not (both_exist and os.path.samefile(egg_path, destination)): + if not ( + os.path.exists(destination) and os.path.samefile(egg_path, destination) + ): if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): -- cgit v1.2.1