diff options
| author | ?ric Araujo <merwok@netwok.org> | 2011-02-10 00:51:42 +0100 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2011-02-10 00:51:42 +0100 |
| commit | 37d72aef1b216abd0840afd73c114bad25621a39 (patch) | |
| tree | f6e479ad1ee4292eccd68aa9b7f120315a143457 /distutils2/command/clean.py | |
| parent | b1bd0f37c556fd24b8cb45cf9d8989a61224144f (diff) | |
| download | disutils2-37d72aef1b216abd0840afd73c114bad25621a39.tar.gz | |
Use lazy form in logging calls, again.
Logging calls have the signature (msg, *args, **kwargs) so that the
%-formatting can be delayed until it is needed. Logger objects also have an
isEnabledFor method that can be used to isolate expensive code.
Next steps: use only one of d2.logger methods or logging module functions;
use a proper handler in our test machinery instead of monkey-patching; remove
cmd.warn and cmd.announce and use logging instead. TODOs have been added in
the modules and on the wiki.
Diffstat (limited to 'distutils2/command/clean.py')
| -rw-r--r-- | distutils2/command/clean.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/distutils2/command/clean.py b/distutils2/command/clean.py index 295cfac..97ea367 100644 --- a/distutils2/command/clean.py +++ b/distutils2/command/clean.py @@ -48,7 +48,7 @@ class clean(Command): # gone) if os.path.exists(self.build_temp): if self.dry_run: - logger.info('Removing %s' % self.build_temp) + logger.info('Removing %s', self.build_temp) else: rmtree(self.build_temp) else: @@ -62,7 +62,7 @@ class clean(Command): self.build_scripts): if os.path.exists(directory): if self.dry_run: - logger.info('Removing %s' % directory) + logger.info('Removing %s', directory) else: rmtree(directory) else: |
