blob: 736a40696888e5e7e6a4e72e0b9c8bf885a45432 [file] [log] [blame]
#!/usr/bin/env python3
import sys
sys.path.append('lib')
from charms.reactive import main
from charms.reactive import set_state
from charmhelpers.core.hookenv import action_fail
"""
`set_state` only works here because it's flushed to disk inside the `main()`
loop. remove_state will need to be called inside the action method.
"""
set_state('actions.dig')
try:
main()
except Exception as e:
action_fail(repr(e))