|
10 | 10 | import logging
|
11 | 11 |
|
12 | 12 | from .errors import DistutilsOptionError
|
13 |
| -from . import util, dir_util, file_util, archive_util, dep_util, log |
| 13 | +from . import util, dir_util, file_util, archive_util, dep_util |
| 14 | +from ._log import log |
14 | 15 |
|
15 | 16 |
|
16 | 17 | class Command:
|
@@ -157,14 +158,14 @@ def dump_options(self, header=None, indent=""):
|
157 | 158 |
|
158 | 159 | if header is None:
|
159 | 160 | header = "command options for '%s':" % self.get_command_name()
|
160 |
| - self.announce(indent + header, level=log.INFO) |
| 161 | + self.announce(indent + header, level=logging.INFO) |
161 | 162 | indent = indent + " "
|
162 | 163 | for (option, _, _) in self.user_options:
|
163 | 164 | option = option.translate(longopt_xlate)
|
164 | 165 | if option[-1] == "=":
|
165 | 166 | option = option[:-1]
|
166 | 167 | value = getattr(self, option)
|
167 |
| - self.announce(indent + "{} = {}".format(option, value), level=log.INFO) |
| 168 | + self.announce(indent + "{} = {}".format(option, value), level=logging.INFO) |
168 | 169 |
|
169 | 170 | def run(self):
|
170 | 171 | """A command's raison d'etre: carry out the action it exists to
|
@@ -332,7 +333,7 @@ def get_sub_commands(self):
|
332 | 333 | # -- External world manipulation -----------------------------------
|
333 | 334 |
|
334 | 335 | def warn(self, msg):
|
335 |
| - log.warn("warning: %s: %s\n", self.get_command_name(), msg) |
| 336 | + log.warning("warning: %s: %s\n", self.get_command_name(), msg) |
336 | 337 |
|
337 | 338 | def execute(self, func, args, msg=None, level=1):
|
338 | 339 | util.execute(func, args, msg, dry_run=self.dry_run)
|
|
0 commit comments