rebased
The above code seems to be identical to the load_policies() function defined below. Should it call that instead?
load_policies()
It would be good to mention that the config is returned, and that it is a dict here.
LGTM
Will this break anything inside Flask if we replace app.conf which is an instance of some custom Flask dict-inherited thingy, with a plain dict? I bet you it will.
app.conf
Maybe better use app.config.update(load_config()) instead.
app.config.update(load_config())
As Randy already noted, let's just load the policies along with the config, no reason for this to be two separate steps.
(We will have to rethink the entire "loading policies" thing when they are stored in the database but that is something for further down the road.)
You're absolutely right.
Yeah, I can't remember why I did this silly thing, :-D
Rebased to address the comments.
Hmm I guess this could also go into greenwave.config instead of greenwave.utils. But no big deal.
greenwave.config
greenwave.utils
:+1:
:+1: here too.
Can probably merge this now. No?
Absolutely okay to merge this.
Pull-Request has been merged by mjia