From d6ec6a22a30f10dfdb39d00eb43269c25c1b43c3 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 3 Oct 2003 17:49:02 +0000 Subject: [PATCH] Let lower layers (http lib) raise exception if trying to use SSL on a non-SSL-enabled system. --- Utility.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Utility.py b/Utility.py index 9563be6..1c2a786 100755 --- a/Utility.py +++ b/Utility.py @@ -54,10 +54,6 @@ class TimeoutHTTPS(HTTPSConnection): bypassed for send and recv calls. Since our hack _is_ in place at connect() time, it should at least provide some timeout protection.""" def __init__(self, host, port=None, timeout=20, **kwargs): - if not hasattr(socket, 'ssl'): - raise ValueError( - 'This Python installation does not have SSL support.' - ) HTTPSConnection.__init__(self, str(host), port, **kwargs) self.timeout = timeout @@ -79,10 +75,6 @@ def urlopen(url, timeout=20, redirects=None): if frag: path = '%s#%s' % (path, frag) if scheme == 'https': - if not hasattr(socket, 'ssl'): - raise ValueError( - 'This Python installation does not have SSL support.' - ) conn = TimeoutHTTPS(host, None, timeout) else: conn = TimeoutHTTP(host, None, timeout)