Skip to content

Commit

Permalink
Catch additional error in e-mail sending routine
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Dec 12, 2023
1 parent 14c1f9c commit f932f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/lib/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def email_token(self, new=False):
try:
send_email([username], message)
return url
except (smtplib.SMTPException, ConnectionRefusedError, socket.timeout) as e:
except (smtplib.SMTPException, ConnectionRefusedError, socket.timeout, socket.gaierror) as e:
raise RuntimeError("Could not send password reset e-mail: %s" % e)

def generate_token(self, username=None, regenerate=True):
Expand Down

0 comments on commit f932f41

Please sign in to comment.