Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use ops.main() instead of ops.main.main()
Ops changed to prefer importing just `ops` and having all of the functionality as an attribute of that top level package, rather than needing to know what module has what functionality. I'm only changing this because we're actually getting a lot of Deprecation warnings in our logs. ``` unit-controller-1: 09:38:39 WARNING unit.controller/1.leader-settings-changed /var/lib/juju/agents/unit-controller-1/charm/./src/charm.py:162: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead unit-controller-1: 09:38:39 WARNING unit.controller/1.leader-settings-changed main(JujuControllerCharm) unit-controller-1: 09:38:39 INFO juju.worker.uniter.operation ran "leader-settings-changed" hook (via hook dispatching script: dispatch) unit-controller-1: 09:38:39 WARNING unit.controller/1.config-changed /var/lib/juju/agents/unit-controller-1/charm/./src/charm.py:162: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead unit-controller-1: 09:38:39 WARNING unit.controller/1.config-changed main(JujuControllerCharm) ``` However, I went through and updated the other places as well.
- Loading branch information