Changed extra_[to|from]_dict to session save/restore

This commit is contained in:
Rob McMullen 2019-03-07 12:00:09 -08:00
parent b9aad5ac08
commit 5aa2560c7c
1 changed files with 2 additions and 2 deletions

View File

@ -553,7 +553,7 @@ class DefaultSegment:
r = r.get_indexed[other.order]
return r
def serialize_extra_to_dict(self, mdict):
def save_session(self, mdict):
"""Save extra metadata to a dict so that it can be serialized
This is not saved by __getstate__ because child segments will point to
@ -573,7 +573,7 @@ class DefaultSegment:
# pairs
mdict["comments"] = self.get_sorted_comments()
def restore_extra_from_dict(self, e):
def restore_session(self, e):
if 'comments' in e:
for k, v in e['comments']:
self.rawdata.extra.comments[k] = v