Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix colorlog import error #21754

Merged
merged 2 commits into from Mar 7, 2019
Merged

Fix colorlog import error #21754

merged 2 commits into from Mar 7, 2019

Conversation

awarecan
Copy link
Contributor

@awarecan awarecan commented Mar 7, 2019

Description:

colorlog is not part of core dependency. We should ignore the import error and fallback to black and white.

Fix the side effect of #20517, cc @kellerza

See user complain here:
https://community.home-assistant.io/t/0-89-nissan-leaf-playstation-4-point-alarm-control-owlet-baby-monitor/103767/12

Related issue (if applicable): fixes #

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@awarecan awarecan requested a review from kellerza as a code owner March 7, 2019 18:39
@homeassistant homeassistant added core small-pr PRs with less than 30 lines. cla-signed labels Mar 7, 2019
@ghost ghost assigned awarecan Mar 7, 2019
@ghost ghost added the in progress label Mar 7, 2019
homeassistant/scripts/check_config.py Outdated Show resolved Hide resolved
homeassistant/scripts/check_config.py Outdated Show resolved Hide resolved
@balloob
Copy link
Member

balloob commented Mar 7, 2019

I'm confused. The script check_config defines REQUIREMENTS that specifies colorlog. If it is not being installed, that's a bug in the check if the package is installed / install the package. We shouldn't fix the check_config script to make it optional.

@balloob balloob added this to the 0.89.1 milestone Mar 7, 2019
@balloob
Copy link
Member

balloob commented Mar 7, 2019

I will mark this for 0.89.1, we can do a proper fix when we're not doing hotfixes.

@balloob balloob merged commit c91fb82 into home-assistant:dev Mar 7, 2019
@ghost ghost removed the in progress label Mar 7, 2019
balloob pushed a commit that referenced this pull request Mar 7, 2019
* Fix colorlog import error

* Lint
@awarecan
Copy link
Contributor Author

awarecan commented Mar 7, 2019

Ah, maybe I missed read the #20517, I through its intention is prevent install colorlog. Let me check it again.

@kellerza
Copy link
Member

kellerza commented Mar 7, 2019

@balloob is correct, you should have focused on scripts\__init__.py. Probably as simple as the config/install dir not loaded in the path for scripts...

@balloob
Copy link
Member

balloob commented Mar 7, 2019

I wonder if the extra deps dir is properly mounted when we're running scripts? https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/bootstrap.py#L368-L377

awarecan added a commit to awarecan/home-assistant that referenced this pull request Mar 7, 2019
@awarecan awarecan mentioned this pull request Mar 7, 2019
9 tasks
balloob pushed a commit that referenced this pull request Mar 8, 2019
* Fix script load depedency

* Revert #21754
balloob pushed a commit that referenced this pull request Mar 8, 2019
* Fix script load depedency

* Revert #21754
@balloob balloob mentioned this pull request Mar 8, 2019
@awarecan awarecan deleted the fix-colorlog branch March 12, 2019 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants