Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions homeassistant/scripts/check_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
from collections import OrderedDict, namedtuple
from glob import glob
from platform import system
from typing import Dict, List, Sequence
from unittest.mock import patch

Expand All @@ -21,9 +20,10 @@
from homeassistant.util import yaml
from homeassistant.exceptions import HomeAssistantError

REQUIREMENTS = ('colorlog==4.0.2',)
if system() == 'Windows': # Ensure colorama installed for colorlog on Windows
REQUIREMENTS += ('colorama<=1',)
try:
import colorlog.escape_codes # noqa # pylint: disable=unused-import
except ImportError:
REQUIREMENTS = ('colorlog==4.0.2',)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will confuse our requirement generator script.

The dev docker image should already have colorlog, so should not install it every time?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it's not added, but there might also be a problem with how we detect colorlog inside Docker If I read this correctly?

root@linuxkit-00155d5dc21f:/usr/src/app# pip list | grep colorlog
colorlog                          4.0.2
root@linuxkit-00155d5dc21f:/usr/src/app# hass --script check_config --config /config
INFO:homeassistant.util.package:Attempting install of colorlog==4.0.2
Testing configuration at /config
Failed config
  homeassistant:
    - extra keys not allowed @ data['packages']['yr__pack']

Another approach would be to make this part of the core requirements... (would prefer this to be honest)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't merge this. We're breaking something because some other wrapper or runner doesn't install correctly or keep it around.

This is not something that should be fixed inside Home Assistant as it works as expected.


_LOGGER = logging.getLogger(__name__)
# pylint: disable=protected-access
Expand Down
3 changes: 0 additions & 3 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,6 @@ coinbase==2.1.0
# homeassistant.components.sensor.coinmarketcap
coinmarketcap==5.0.3

# homeassistant.scripts.check_config
colorlog==4.0.2

# homeassistant.components.alarm_control_panel.concord232
# homeassistant.components.binary_sensor.concord232
concord232==0.15
Expand Down