Skip to content

Commit

Permalink
Merge pull request #6854 from chrahunt/refactor/remove-unnecessary-as
Browse files Browse the repository at this point in the history
Clean up import in moved module.
  • Loading branch information
cjerdonek authored Aug 10, 2019
2 parents 6f0e873 + a041871 commit 2bfafc9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import errno
import getpass
import io
# we have a submodule named 'logging' which would shadow this if we used the
# regular name:
import logging as std_logging
import logging
import os
import posixpath
import re
Expand Down Expand Up @@ -83,8 +81,8 @@ def cast(type_, value): # type: ignore
'get_installed_version', 'remove_auth_from_url']


logger = std_logging.getLogger(__name__)
subprocess_logger = std_logging.getLogger('pip.subprocessor')
logger = logging.getLogger(__name__)
subprocess_logger = logging.getLogger('pip.subprocessor')

LOG_DIVIDER = '----------------------------------------'

Expand Down Expand Up @@ -859,12 +857,12 @@ def call_subprocess(
if show_stdout:
# Then log the subprocess output at INFO level.
log_subprocess = subprocess_logger.info
used_level = std_logging.INFO
used_level = logging.INFO
else:
# Then log the subprocess output using DEBUG. This also ensures
# it will be logged to the log file (aka user_log), if enabled.
log_subprocess = subprocess_logger.debug
used_level = std_logging.DEBUG
used_level = logging.DEBUG

# Whether the subprocess will be visible in the console.
showing_subprocess = subprocess_logger.getEffectiveLevel() <= used_level
Expand Down

0 comments on commit 2bfafc9

Please sign in to comment.