From 25535069d5943b6e7bbbe4607e40685a7ed36ea4 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 30 May 2022 18:32:43 -0700 Subject: selectors.py: Bug 800149. Add general exception for any other server error Catch any other server errors so that mirrorselect will ignore that server without crashing. It will also output the error and request it to be reported. Signed-off-by: Brian Dolbec --- mirrorselect/selectors.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py index 74405a7..35051ee 100644 --- a/mirrorselect/selectors.py +++ b/mirrorselect/selectors.py @@ -460,6 +460,11 @@ class Deep(object): except TimeoutException: self.output.write(('deeptime(): connection to host %s ' 'timed out for ip %s\n') % (url_parts.hostname, ip), 2) + except Exception as e: # Add general exception to catch any other errors + self.output.write(('deeptime(): connection to host %s ' + 'errored for ip %s\n %s\n' + ' Please file a bug for this error at bugs.gentoo.org') + % (url_parts.hostname, ip, e), 2) return f, test_url, early_out -- cgit v1.2.3-65-gdbad