From fa25cd5cd02450d513fcaa4033aacc7a75c796fd Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 2 Dec 2024 19:49:03 -0600 Subject: [PATCH] Fix urllib imports for the email policy --- britney2/policies/email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/britney2/policies/email.py b/britney2/policies/email.py index d62cb60..6ac9307 100644 --- a/britney2/policies/email.py +++ b/britney2/policies/email.py @@ -5,7 +5,7 @@ import math import socket import smtplib -from urllib.error import HTTPError +from urllib.error import HTTPError, URLError from urllib.parse import unquote from collections import defaultdict @@ -188,7 +188,7 @@ class EmailPolicy(BasePolicy, Rest): "version": version, }, ) - except urllib.error.URLError as e: + except URLError as e: self.logger.error("Error getting uploader from Launchpad for %s/%s: %s", pkg, version, e.reason) try: