aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Harding <dharding@living180.net>2017-09-02 11:13:00 +0000
committerZac Medico <zmedico@gentoo.org>2019-02-12 21:50:12 -0800
commit92d682ca0f8d173149df8511a06b0457ffbffa8d (patch)
tree5c1d2219a23674954870a6000a88adea9fdf9e47 /mirrorselect
parentUpdate version for 2.2.3 release (diff)
downloadmirrorselect-92d682ca0f8d173149df8511a06b0457ffbffa8d.tar.gz
mirrorselect-92d682ca0f8d173149df8511a06b0457ffbffa8d.tar.bz2
mirrorselect-92d682ca0f8d173149df8511a06b0457ffbffa8d.zip
selectors.py: handle ssl.CertificateError (bug 604968)
Bug: https://bugs.gentoo.org/604968 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'mirrorselect')
-rw-r--r--mirrorselect/selectors.py3
1 files changed, 2 insertions, 1 deletions
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)