Fixes typos in Optimizing Reactive Handlers
Fixes a couple of typos in the Optimizing Reactive Handlers in a Charm code examples. Change-Id: Id06a66e12fe4ec746ba0079019e072c181932132
This commit is contained in:
parent
e0dc961efb
commit
6bc6c3f8af
|
@ -245,7 +245,7 @@ secondary state as the trigger to do the work needed. e.g.:
|
|||
set_state('name_has_changed')
|
||||
|
||||
@when('name_has_changed')
|
||||
@when('<name>.available'):
|
||||
@when('<name>.available')
|
||||
def do_something_with_data(the_if_object):
|
||||
do_something_with(the_if_object.get_data())
|
||||
remove_state('name_has_changed')
|
||||
|
@ -296,7 +296,7 @@ Exception. It can be used as follows:
|
|||
|
||||
import charms_openstack.charm.utils as utils
|
||||
|
||||
@when('<name>.available'):
|
||||
@when('<name>.available')
|
||||
def do_something_with_data(the_if_object):
|
||||
data = the_if_object.get_data()
|
||||
with utils.is_data_changed('some-meaningful-key', data) as f:
|
||||
|
|
Loading…
Reference in New Issue