Hi all
I have the following piece of code that reacts to the
httprelation.available hook (called rest2jfed in this case):
@when('rest2jfed.available')
def setup_rest2jfed(rest2jfed):
hostname = rest2jfed.host()
port = rest2jfed.port()
# Do some stuff with hostname and port
hookenv.status_set('active', 'Ready')
This piece of code gets called on the upgrade-charm hook. This throws an
error because there is not a relationship context.
File "lib/charms/reactive/relations.py", line 88, in __accessor
return self.get_remote(field)
File "lib/charms/reactive/relations.py", line 308, in get_remote
return self.conversation(scope).get_remote(key, default)
File "lib/charms/reactive/relations.py", line 255, in conversation
raise ValueError('Unable to determine default scope: no current hook or
global scope')
Am I using this relation wrong or is this a bug?
Kind regards
Merlijn
--
Juju mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/juju