Don't use logger before it is configured

This patch removes the first call to check_provider. Because logging
is not configured when the file is imported, any calls to logger.error
result only this unhelpful error message being shown:

  No handlers could be found for logger "stacktrain.config.general"

The check_provider call in st.py is the only one we need.

backport: rocky queens

Closes-Bug: #1803341

Change-Id: Ie75ca928b13a51433f8d61500407049a0e636d45
This commit is contained in:
Roger Luethi 2019-05-25 12:17:05 +02:00
parent e4dec38469
commit af042e0716
1 changed files with 0 additions and 1 deletions

View File

@ -132,7 +132,6 @@ dl.downloader.vm_proxy = vm_proxy
provider = cfg_localrc.get_value("PROVIDER")
logger.debug("Checking provider given by config/localarc: %s", provider)
check_provider()
distro_full = cfg_localrc.get_value("DISTRO")
# ubuntu-14.04-server-amd64 -> ubuntu_14_04_server_amd64
distro_full = re.sub(r'[-.]', '_', distro_full)