Commit cbc3c959 authored by Jason R. Coombs's avatar Jason R. Coombs

Use 'path' to describe a file or directory.

parent 16a42402
...@@ -204,16 +204,16 @@ class easy_install(Command): ...@@ -204,16 +204,16 @@ class easy_install(Command):
filename for filename in blockers filename for filename in blockers
if os.path.exists(filename) or os.path.islink(filename) if os.path.exists(filename) or os.path.islink(filename)
) )
list(map(self._delete_filename, extant_blockers)) list(map(self._delete_path, extant_blockers))
def _delete_filename(self, filename): def _delete_path(self, path):
log.info("Deleting %s", filename) log.info("Deleting %s", path)
if self.dry_run: if self.dry_run:
return return
is_tree = os.path.isdir(filename) and not os.path.islink(filename) is_tree = os.path.isdir(path) and not os.path.islink(path)
remover = rmtree if is_tree else os.unlink remover = rmtree if is_tree else os.unlink
remover(filename) remover(path)
def finalize_options(self): def finalize_options(self):
if self.version: if self.version:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment