Changeset 86

Show
Ignore:
Timestamp:
02/27/08 14:59:54 (9 months ago)
Author:
fs
Message:

use the built-in make_msgid() from email.utils for generation of message ids to reduce dependencies

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/setup.py

    r84 r86  
    7373        license=license, 
    7474     
    75         install_requires = [ 
    76             "uuid >= 1.30" 
    77         ], 
    78          
    7975        extras_require = { 
    8076            'turbogears': ["TurboMail-Gears >= 0.1"], 
  • trunk/turbomail/message.py

    r85 r86  
    1919from email.Header import Header 
    2020 
    21 from uuid import uuid1 as uuid 
     21from email.utils import make_msgid 
    2222 
    2323import logging 
     
    3434     
    3535    def __init__(self, envelope, recipient, message): 
    36         self.id = str(uuid()) 
     36        self.id = make_msgid() 
    3737        self.envelope = AddressList(envelope) 
    3838        self.recipient = AddressList(recipient) 
     
    113113    def id(self): 
    114114        if not self._id or (self._processed and self._dirty): 
    115             self.__dict__['_id'] = str(uuid()) 
     115            self.__dict__['_id'] = make_msgid() 
    116116             
    117117            self._processed = False