示例#1
0
 def id(self):
     """Get an ID for the message which is used for logging.
     The idea is to use the message id if it is available, otherwise a 
     generated message id."""
     if self._id is None:
         msg_id = None
         if self.message is not None:
             if self.email_msg is not None:
                 msg_id = self.email_msg['Message-ID']
         if msg_id is None:
             msg_id = make_msgid()
         self.__dict__['_id'] = msg_id
     return self._id
示例#2
0
文件: message.py 项目: mbbui/Jminee
 def id(self):
     if not self._id or (self._processed and self._dirty):
         self.__dict__['_id'] = make_msgid()
         self._processed = False
     return self._id