- Timestamp:
- 11/07/08 15:13:58 (2 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
tests/test_tm2_compatibility.py (modified) (2 diffs)
-
turbomail/control.py (modified) (2 diffs)
-
turbomail/exceptions.py (modified) (3 diffs)
-
turbomail/providers/smtp.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_tm2_compatibility.py
r109 r113 7 7 8 8 import turbomail 9 from turbomail import Message, MailNotEnabledE rror9 from turbomail import Message, MailNotEnabledException 10 10 from turbomail.managers.immediate import ImmediateManager 11 11 from turbomail.providers.debug import DebugProviderFactory … … 53 53 message = Message('from@example.com', 'to@example.com', 'Test') 54 54 message.plain = 'Hello world!' 55 self.assertRaises(MailNotEnabledE rror, turbomail.enqueue, message)55 self.assertRaises(MailNotEnabledException, turbomail.enqueue, message) 56 56 57 57 def test_message_enqueue(self): -
trunk/turbomail/control.py
r102 r113 31 31 32 32 33 from turbomail.exceptions import MailNotEnabledE rror33 from turbomail.exceptions import MailNotEnabledException 34 34 35 35 class ControlClass(object): … … 125 125 def send(self, message): 126 126 if not self.manager: 127 raise MailNotEnabledE rror127 raise MailNotEnabledException 128 128 129 129 return self.manager.deliver(message) -
trunk/turbomail/exceptions.py
r109 r113 4 4 5 5 __version__ = "$Revision$" 6 __all__ = ['MailException', 'MailNotEnabledE rror', 'MailConfigurationError',6 __all__ = ['MailException', 'MailNotEnabledException', 'MailConfigurationException', 7 7 'ProviderException', 'ProviderExhaustedException', 'ManagerException'] 8 8 … … 14 14 15 15 16 class MailNotEnabledE rror(MailException):16 class MailNotEnabledException(MailException): 17 17 """Attempted to use TurboMail before being enabled.""" 18 18 … … 23 23 24 24 25 class MailConfigurationE rror(MailException):25 class MailConfigurationException(MailException): 26 26 """There was an error in the configuration of TurboMail.""" 27 27 -
trunk/turbomail/providers/smtp.py
r111 r113 11 11 12 12 from turbomail.api import ProviderFactory, Provider 13 from turbomail.exceptions import MailConfigurationE rror, ProviderExhaustedException13 from turbomail.exceptions import MailConfigurationException, ProviderExhaustedException 14 14 from turbomail.control import interface 15 15 … … 38 38 self.count = self.config_get("mail.smtp.count", default=10, tm2_key='jobs') 39 39 40 # Defaults to localhost -- if self.server is None: raise MailConfigurationE rror, "You must define mail.smtp.server in your configuration."40 # Defaults to localhost -- if self.server is None: raise MailConfigurationException, "You must define mail.smtp.server in your configuration." 41 41 42 42 self.connection = SMTP()
