From 16a4240286b5202e2a52c22efb63fc3c1ba7ab02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:39:36 -0500 Subject: More concisely describe the removal. --- setuptools/command/easy_install.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bf380f13..0828be84 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -212,10 +212,8 @@ class easy_install(Command): return is_tree = os.path.isdir(filename) and not os.path.islink(filename) - if is_tree: - rmtree(filename) - else: - os.unlink(filename) + remover = rmtree if is_tree else os.unlink + remover(filename) def finalize_options(self): if self.version: -- cgit v1.2.1