Remove data persistence layer since #1279018 is fixed

Bug #1615115 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
block-storage-broker (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

Bug #1279018 has been fixed for a long time. Looks like we can remove the persistence layer we added as a workaround:
# XXX We can remove _persist_data when juju bug:1279018 is fixed to provide
# relation-data from *-relation-departed hook runs
def _persist_data(key, value):
    """Save C{key} and C{value} pairs in a persistent file for reference"""
    data = {}
    filepath = "%s/%s" % (hookenv.charm_dir(), PERSIST_DATA_FILE)
    if os.path.exists(filepath):
        with open(filepath) as inputfile:
            data = json.load(inputfile)
    data[key] = value
    with open(filepath, "w") as outfile:
        outfile.write(unicode(json.dumps(data, ensure_ascii=False)))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.