From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B50B138334 for ; Wed, 13 Feb 2019 05:51:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C1DDE0885; Wed, 13 Feb 2019 05:51:39 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1F807E0885 for ; Wed, 13 Feb 2019 05:51:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3450A340CCF for ; Wed, 13 Feb 2019 05:51:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D6C78503 for ; Wed, 13 Feb 2019 05:51:34 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1550037012.92d682ca0f8d173149df8511a06b0457ffbffa8d.zmedico@gentoo> Subject: [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/ X-VCS-Repository: proj/mirrorselect X-VCS-Files: mirrorselect/selectors.py X-VCS-Directories: mirrorselect/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 92d682ca0f8d173149df8511a06b0457ffbffa8d X-VCS-Branch: master Date: Wed, 13 Feb 2019 05:51:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 65e0e813-1924-4fe7-b5f6-b2ff77e247d4 X-Archives-Hash: 2e20c1f4343dbaeffe9c92249451a4cb commit: 92d682ca0f8d173149df8511a06b0457ffbffa8d Author: Daniel Harding living180 net> AuthorDate: Sat Sep 2 11:13:00 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Feb 13 05:50:12 2019 +0000 URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=92d682ca selectors.py: handle ssl.CertificateError (bug 604968) Bug: https://bugs.gentoo.org/604968 Signed-off-by: Zac Medico gentoo.org> mirrorselect/selectors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py index cf70b21..58a44a1 100644 --- a/mirrorselect/selectors.py +++ b/mirrorselect/selectors.py @@ -31,6 +31,7 @@ Distributed under the terms of the GNU General Public License v2 import math import signal import socket +import ssl import subprocess import sys import time @@ -430,7 +431,7 @@ class Deep(object): if len(ips) == 1: test_url = url_unparse(url_parts) return self._test_connection(test_url, url_parts, ip, []) - except EnvironmentError as e: + except (EnvironmentError, ssl.CertificateError) as e: self.output.write('deeptime(): connection to host %s ' 'failed for ip %s:\n %s\n' % (url_parts.hostname, ip, e), 2)