Browse Source

Let lower layers (http lib) raise exception if trying to use SSL on

a non-SSL-enabled system.
main
Rich Salz 21 years ago
parent
commit
d6ec6a22a3
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      Utility.py

+ 0
- 8
Utility.py View File

@@ -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)


Loading…
Cancel
Save