def __setstate__(self, state):
     Script.__setstate__(self, state)
     if (getattr(self, 'Python_magic', None) != Python_magic
             or getattr(self, 'Script_magic', None) != Script_magic):
         global _log_complaint
         if _log_complaint:
             LOG.info(_log_complaint)
             _log_complaint = 0
         # Changes here won't get saved, unless this Script is edited.
         body = self._body.rstrip()
         if body:
             self._body = body + '\n'
         self._compile()
         self._v_change = 1
     elif self._code is None:
         self._v_ft = None
     else:
         self._newfun(marshal.loads(self._code))
Example #2
0
 def __setstate__(self, state):
     Script.__setstate__(self, state)
     if (getattr(self, 'Python_magic', None) != Python_magic or
         getattr(self, 'Script_magic', None) != Script_magic):
         global _log_complaint
         if _log_complaint:
             LOG.info(_log_complaint)
             _log_complaint = 0
         # Changes here won't get saved, unless this Script is edited.
         body = self._body.rstrip()
         if body:
             self._body = body + '\n'
         self._compile()
         self._v_change = 1
     elif self._code is None:
         self._v_ft = None
     else:
         self._newfun(marshal.loads(self._code))