@inlineCallbacks<EOL><INDENT>def get_or_wait(self, path, name):<DEDENT>
<EOL>d, watch = self.get_children_and_watch(path)<EOL>deferred = Deferred()<EOL>path += "<STR_LIT:/>" + name<EOL>@watch.addCallback<EOL>def _notify(event):<EOL><INDENT>if event.type_name == "<STR_LIT>":<EOL><INDENT>d = self.get(path)<EOL>d.addCallback(deferred.callback)<EOL><DEDENT><DEDENT>children = yield d<EOL>if name in children:<EOL><INDENT>watch.cancel()<EOL>deferred = self.get(path)<EOL><DEDENT>result = yield deferred<EOL>returnValue(result)<EOL>
Get data of node under path, or wait for it.