def __init__(self, *args, **kwargs): parent.__init__(self, *args, **kwargs) self.editable = editable self.source_map = {} self.is_local = False self._lock = MboxRLock() self._save_to = None self._encryption_key_func = lambda: None self._decryption_key_func = lambda: None self.__init2__(*args, **kwargs)
def __setstate__(self, data): self.__dict__.update(data) self._lock = MboxRLock() with self._lock: self._save_to = None self._encryption_key_func = lambda: None self._decryption_key_func = lambda: None if not hasattr(self, 'source_map'): self.source_map = {} if (len(self.source_map) > 0 and not hasattr(self, 'is_local') or not self.is_local): self.is_local = True self.update_toc()