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

Short circuit on dry run

parent 7ab342a1
......@@ -208,12 +208,14 @@ class easy_install(Command):
def _delete_filename(self, filename):
log.info("Deleting %s", filename)
if not self.dry_run:
if (os.path.isdir(filename) and
not os.path.islink(filename)):
rmtree(filename)
else:
os.unlink(filename)
if self.dry_run:
return
if (os.path.isdir(filename) and
not os.path.islink(filename)):
rmtree(filename)
else:
os.unlink(filename)
def finalize_options(self):
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