Fix usage of dry-run in packaging bdist_wininst and install_distinfo.

In dry-run mode, packaging commands should log the same info as in real
operation and should collect the same files in self.outputs, so that
users can run a command in verbose and dry-run mode to see exactly what
operations will be done in the real run.
This commit is contained in:
Éric Araujo 2011-09-10 18:10:23 +02:00
parent e6db7a3a29
commit c8f9c81cfa
2 changed files with 38 additions and 39 deletions

View file

@ -186,9 +186,8 @@ class bdist_wininst(Command):
os.remove(arcname)
if not self.keep_temp:
if self.dry_run:
logger.info('removing %s', self.bdist_dir)
else:
logger.info('removing %s', self.bdist_dir)
if not self.dry_run:
rmtree(self.bdist_dir)
def get_inidata(self):