Assume the sequence of actions is always a tuple, a make a copy like this
actions = list(actions)
The fact that it is occasionally a list is a side effect of JSON not supporting tuples.
And when you commit it use
gprefs[whatever] = tuple(actions)
And dont worry about instantiating the plugin. If things need to change there, I'll fix them when you submit the code.
|