Revision 18ffbee1 snf-astakos-app/astakos/im/functions.py

b/snf-astakos-app/astakos/im/functions.py
170 170
    
171 171
    Raises SendInvitationError
172 172
    """
173
    invitation.inviter = inviter
174
    invitation.save()
173 175
    send_invitation(invitation, email_template_name)
174 176
    inviter.invitations = max(0, inviter.invitations - 1)
175 177
    inviter.save()
......
183 185
        logger.exception(e)
184 186

  
185 187
class SendMailError(Exception):
186
    def __init__(self, message):
187
        Exception.__init__(self)
188
    pass
188 189

  
189 190
class SendAdminNotificationError(SendMailError):
190 191
    def __init__(self):
191 192
        self.message = _('Failed to send notification')
192
        SendMailError.__init__(self)
193
        super(SendAdminNotificationError, self).__init__()
193 194

  
194
class SendVerificationError(Exception):
195
class SendVerificationError(SendMailError):
195 196
    def __init__(self):
196 197
        self.message = _('Failed to send verification')
197
        SendMailError.__init__(self)
198
        super(SendVerificationError, self).__init__()
198 199

  
199
class SendInvitationError(Exception):
200
class SendInvitationError(SendMailError):
200 201
    def __init__(self):
201 202
        self.message = _('Failed to send invitation')
202
        SendMailError.__init__(self)
203
        super(SendInvitationError, self).__init__()
203 204

  
204
class SendGreetingError(Exception):
205
class SendGreetingError(SendMailError):
205 206
    def __init__(self):
206 207
        self.message = _('Failed to send greeting')
207
        SendMailError.__init__(self)
208
        super(SendGreetingError, self).__init__()
208 209

  
209
class SendFeedbackError(Exception):
210
class SendFeedbackError(SendMailError):
210 211
    def __init__(self):
211 212
        self.message = _('Failed to send feedback')
212
        SendMailError.__init__(self)
213
        super(SendFeedbackError, self).__init__()

Also available in: Unified diff