projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wait for entity if it doesn't exist yet
[osm/N2VC.git]
/
juju
/
model.py
diff --git
a/juju/model.py
b/juju/model.py
index
7781d34
..
5fb45b6
100644
(file)
--- a/
juju/model.py
+++ b/
juju/model.py
@@
-1325,7
+1325,10
@@
class BundleHandler(object):
Annotations holds the annotations as key/value pairs.
"""
entity_id = self.resolve(id_)
Annotations holds the annotations as key/value pairs.
"""
entity_id = self.resolve(id_)
- entity = self.model.state.get_entity(entity_type, entity_id)
+ try:
+ entity = self.model.state.get_entity(entity_type, entity_id)
+ except KeyError:
+ entity = await self._wait_for_new(entity_type, entity_id)
return await entity.set_annotations(annotations)
return await entity.set_annotations(annotations)