projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved Primitive support and better testing
[osm/N2VC.git]
/
modules
/
libjuju
/
examples
/
livemodel.py
diff --git
a/modules/libjuju/examples/livemodel.py
b/modules/libjuju/examples/livemodel.py
index
a15e9f7
..
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,6
+19,7
@@
async def on_model_change(delta, old, new, model):
async def watch_model():
model = Model()
async def watch_model():
model = Model()
+ # connect to current model with current user, per Juju CLI
await model.connect()
model.add_observer(on_model_change)
await model.connect()
model.add_observer(on_model_change)