Revision 73fbaec4 snf-astakos-app/astakos/im/notifications.py

b/snf-astakos-app/astakos/im/notifications.py
46 46
logger = logging.getLogger(__name__)
47 47

  
48 48
def build_notification(
49
    sender, recipients, subject, message=None, template=None, dictionary=None
50
):
49
    sender, recipients, subject, message=None, template=None, dictionary=None):
51 50
    return EmailNotification(
52
        sender, recipients, subject, message, template, dictionary
53
    )
51
        sender, recipients, subject, message, template, dictionary)
54 52

  
55 53
class Notification(object):
56 54
    def __init__(
57 55
        self, sender, recipients, subject,
58
        message=None, template=None, dictionary=None
59
    ):
56
        message=None, template=None, dictionary=None):
60 57
        if not message and not template:
61 58
            raise InputError('message and template cannot be both None.')
62 59
        dictionary = dictionary or {}
......
75 72
                self.subject,
76 73
                self.message,
77 74
                self.sender,
78
                self.recipients
79
            )
75
                self.recipients)
80 76
        except (SMTPException, socket.error), e:
81 77
            logger.exception(e)
82 78
            raise NotificationError()

Also available in: Unified diff