X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2Fexamples%2Flivemodel.py;h=1b10ac92352542c3eb5444c1c1a6631fc824c377;hp=47eb999b528e5cb281f092b3b2f0458986889af1;hb=e2051cca7dac12aa09f6ed33555dcc4548c4b52b;hpb=68858c1915122c2dbc8999a5cd3229694abf5f3a;ds=sidebyside diff --git a/modules/libjuju/examples/livemodel.py b/modules/libjuju/examples/livemodel.py index 47eb999..1b10ac9 100644 --- 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) """ -import asyncio - 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() - await model.connect_current() + # connect to current model with current user, per Juju CLI + await model.connect() model.add_observer(on_model_change)