Polymer access to log file broken when using new log file command line#9437
Merged
Conversation
|
@TD22057, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @JshWright and @pvizeli to be potential reviewers. |
balloob
reviewed
Sep 15, 2017
| pass | ||
|
|
||
| # Log errors to a file if we have write access to file or config dir | ||
| global ERROR_LOG_PATH |
Member
There was a problem hiding this comment.
Please store data in hass.data, a dictionary for this purpose. We should not use globals.
Member
|
Tox does not re-create the test environment on each invocation. Since our test requirements changed, you need to re-create it. Run once: |
Contributor
Author
|
Fixed. Thanks for the help. I tried to check the key I selected to make sure it wasn't in use somewhere else but that proved to be difficult. |
balloob
approved these changes
Sep 16, 2017
Member
|
Awesome! 🐬 🌮 Thanks! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
If the new command line input for the log file is used from PR #9422, the polymer developer tools info page cannot find the log file location. It uses the default log file location and the hass config path to load a file that is no longer there. This PR fixes that issue by creating a new variable ERROR_LOG_PATH which components/api.py can access to load the actual log file location.
FYI I could not run tox. The current state of the dev branch throws the following error. Manual tests were run w/ the fix and the webui finds the default or custom log file correctly now.
Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable ([example][ex-requir]).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass