2000-02-26 10:24:46 +00:00
|
|
|
from UrlData import UrlData
|
2000-02-29 12:53:00 +00:00
|
|
|
from HttpUrlData import HttpUrlData
|
|
|
|
|
_supportHttps=1
|
|
|
|
|
try: import httpslib
|
|
|
|
|
except: _supportHttps=0
|
|
|
|
|
|
|
|
|
|
class HttpsUrlData(HttpUrlData):
|
|
|
|
|
"""Url link with https scheme"""
|
|
|
|
|
|
|
|
|
|
def __init__(self,
|
|
|
|
|
urlName,
|
|
|
|
|
recursionLevel,
|
|
|
|
|
parentName = None,
|
|
|
|
|
baseRef = None,
|
2000-03-26 21:33:21 +00:00
|
|
|
line = 0):
|
2000-02-29 12:53:00 +00:00
|
|
|
HttpUrlData.__init__(self, urlName, recursionLevel,
|
2000-03-26 21:33:21 +00:00
|
|
|
parentName, baseRef, line)
|
2000-02-29 12:53:00 +00:00
|
|
|
|
|
|
|
|
def _getHTTPObject(self, host):
|
|
|
|
|
return httpslib.HTTPS(host)
|
2000-02-26 10:24:46 +00:00
|
|
|
|
|
|
|
|
def check(self, config):
|
2000-02-29 12:53:00 +00:00
|
|
|
if _supportHttps:
|
|
|
|
|
HttpUrlData.check(self, config)
|
|
|
|
|
else:
|
|
|
|
|
self.setWarning("HTTPS url ignored")
|
|
|
|
|
self.logMe(config)
|
|
|
|
|
|
2000-02-26 10:24:46 +00:00
|
|
|
def __str__(self):
|
|
|
|
|
return "HTTPS link\n"+UrlData.__str__(self)
|