projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Remove vendored libjuju"
[osm/N2VC.git]
/
modules
/
libjuju
/
examples
/
livemodel.py
diff --git
a/modules/libjuju/examples/livemodel.py
b/modules/libjuju/examples/livemodel.py
index
47eb999
..
1b10ac9
100644
(file)
--- a/
modules/libjuju/examples/livemodel.py
+++ b/
modules/libjuju/examples/livemodel.py
@@
-6,8
+6,6
@@
This example:
3. Runs forever (kill with Ctrl-C)
"""
3. Runs forever (kill with Ctrl-C)
"""
-import asyncio
-
from juju.model import Model
from juju import loop
from juju.model import Model
from juju import loop
@@
-21,7
+19,8
@@
async def on_model_change(delta, old, new, model):
async def watch_model():
model = Model()
async def watch_model():
model = Model()
- await model.connect_current()
+ # connect to current model with current user, per Juju CLI
+ await model.connect()
model.add_observer(on_model_change)
model.add_observer(on_model_change)