예제 #1
0
    def __init__(self, title, status, message, exceptions = None, editable = True, format = None, edit_toggle = True, **k):
        ObservableSlotsSavable.__init__(self)

        if exceptions is None:
            exceptions = {}

        autoassign(self, locals())

        self.check_types()
        self.cap_title_len()
예제 #2
0
 def __getstate__(self, network=False, *a, **k):
     ret = ObservableSlotsSavable.__getstate__(self, *a, **k)
     if ret['format'] is not None:
         ret['format'] = dict(ret['format'])
     exceptions = ret['exceptions']
     if network:
         ret.pop('edit_toggle', None)
     if not exceptions: #could be a tuple
         return ret
     exceptions = dict(exceptions) #do not want to change our own state
     for ex, exobj in exceptions.items():
         exceptions[ex] = exobj.__getstate__(network=network)
     ret['exceptions'] = exceptions
     return ret
예제 #3
0
 def __setstate__(self, *a, **k):
     ObservableSlotsSavable.__setstate__(self, *a, **k)
     self.check_types()
     self.cap_title_len()