py-miracle icon indicating copy to clipboard operation
py-miracle copied to clipboard

pickle.load(file) fails

Open eivaremir opened this issue 4 years ago • 0 comments

The following code must be defined outside the constructor image

_roles = set()
_structure = defaultdict(set)
_grants = set()

If you try to save the state of the acl in a file and the load it again using picke.load(file), youll get an error saying these 3 attributes

are not defined, because when loading thru this way the constructor is not being executed. image

Doing this im able to create a local backup of the acl and dont loosing it at runtime

eivaremir avatar Mar 08 '21 00:03 eivaremir