Commit acddcf78 authored by Carine Dengler's avatar Carine Dengler
Browse files

fix: catch autentication exception

branch : 3.25
parent a91f1eff6e59
......@@ -189,7 +189,7 @@ from os.path import (exists, join, expanduser, abspath, normpath,
import pkgutil
import pkg_resources
import re
from smtplib import SMTP
from smtplib import SMTP, SMTPAuthenticationError
import stat
import sys
from threading import Lock
......@@ -1408,8 +1408,14 @@ the repository',
smtp = SMTP(server, port)
if smtp_user and smtp_password:
smtp.login(smtp_user, smtp_password)
except SMTPAuthenticationError as exception:
"cannot log in to SMTP server %s:%s (%s)",
server, port, exception
except Exception as ex:
self.exception("can't connect to smtp server %s:%s (%s)",
server, port, ex)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment