[gen] added tool.sendMail as an easy access method for function appy.gen.mail.sendMail.

This commit is contained in:
Gaetan Delannay 2013-02-28 23:00:06 +01:00
parent 7be0a7789d
commit b717a001d4

View file

@ -1,6 +1,7 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
import os.path, time import os.path, time
import appy import appy
from appy.gen.mail import sendMail
from appy.shared.utils import executeCommand from appy.shared.utils import executeCommand
from appy.gen.wrappers import AbstractWrapper from appy.gen.wrappers import AbstractWrapper
from appy.gen.installer import loggedUsers from appy.gen.installer import loggedUsers
@ -130,6 +131,10 @@ class ToolWrapper(AbstractWrapper):
self.log('Executing %s...' % cmd) self.log('Executing %s...' % cmd)
return executeCommand(cmd) # The result can contain an error message return executeCommand(cmd) # The result can contain an error message
def sendMail(self, to, subject, body, attachments=None):
'''Sends a mail. See doc for appy.gen.mail.sendMail.'''
sendMail(self, to, subject, body, attachments=attachments)
def refreshSecurity(self): def refreshSecurity(self):
'''Refreshes, on every object in the database, security-related, '''Refreshes, on every object in the database, security-related,
workflow-managed information.''' workflow-managed information.'''