From 8ac75ce1554ba177e596c3347cd41fc2f222bc86 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 18 Jan 2005 17:04:31 +0000 Subject: [PATCH] only add socket.sslerror to exception list if needed git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2156 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/checker/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linkcheck/checker/__init__.py b/linkcheck/checker/__init__.py index 16abf63f..507f5983 100644 --- a/linkcheck/checker/__init__.py +++ b/linkcheck/checker/__init__.py @@ -1,5 +1,7 @@ # -*- coding: iso-8859-1 -*- -"""main function module for link checking""" +""" +Main functions for link checking. +""" # Copyright (C) 2000-2005 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify @@ -58,7 +60,7 @@ ExcList = [ ftplib.error_proto, ] # XXX remove this when depending on python >= 2.4 -if hasattr(socket, "sslerror"): +if hasattr(socket, "sslerror") and sys.version_info >= (2, 4, 0, 'final', 0): ExcList.append(socket.sslerror)