Revision 27e26a41 snf-astakos-app/astakos/im/functions.py

b/snf-astakos-app/astakos/im/functions.py
38 38
from django.template.loader import render_to_string
39 39
from django.core.mail import send_mail
40 40
from django.core.urlresolvers import reverse
41
from django.core.exceptions import ValidationError
42

  
41 43
from urllib import quote
42 44
from urlparse import urljoin
43 45
from smtplib import SMTPException
......
158 160
    """
159 161
    Activates the specific user and sends email.
160 162
    
161
    Raises SendGreetingError
163
    Raises SendGreetingError, ValidationError
162 164
    """
163 165
    user.is_active = True
164 166
    user.save()
......
183 185
        user.save()
184 186
    except AstakosUser.DoesNotExist, e:
185 187
        logger.exception(e)
188
    except ValidationError, e:
189
        logger.exception(e)
186 190

  
187 191
class SendMailError(Exception):
188 192
    pass

Also available in: Unified diff