-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Corrected a missmatch between the verbose environnement flag and read value #304
base: 2.7.8
Are you sure you want to change the base?
Conversation
Thanks will merge this soon. |
@johanmeijer I realized that this method of manually specifying environment key is so error-prone. In my fork I have this process automated via a custom configparser with option of specifying a custom env key in case of conflict (like influxdb/mqtt username/pass) https://github.com/rany2/grott/blob/master/grottconf.py#L25-L66 |
I changed the error according the gverbose manually. I like the idea of the automatic generation off the environmental variables and will pick to up in a next release (needs some more test work from my side). |
- added first MIN support - added some field to SPA layout - fix bug with gverbose environment (see pr: johanmeijer#304) - fix bug in devider for batery SOC (see pr: johanmeijer#305)
- added first MIN support - added some field to SPA layout - fix bug with gverbose environment (see pr: johanmeijer#304) - fix bug in devider for batery SOC (see pr: johanmeijer#305)
- added first MIN support - added some field to SPA layout - fix bug with gverbose environment (see pr: johanmeijer#304) - fix bug in devider for batery SOC (see pr: johanmeijer#305)
When setting the environment flag
gverbose
to True or False, there is no change.The problem stems from this line:
if os.getenv('gverbose') != None : self.verbose = self.getenv('verbose')
If the env var gverbose is detected, it reads the env var verbose, but verbose is not set, so the verbose mode stays False.
If you set both the env var to :
It starts to work
This patch corrects this problem Tested after the patch, you only need to set gverbose for the verbose logging to work.