2004-07-07 18:15:17 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
2009-01-08 14:18:03 +00:00
|
|
|
# Copyright (C) 2000-2009 Bastian Kleineidam
|
2004-07-07 18:15:17 +00:00
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2005-01-19 15:08:02 +00:00
|
|
|
"""
|
|
|
|
|
Handle https links.
|
|
|
|
|
"""
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2008-05-09 06:16:03 +00:00
|
|
|
from . import httpurl
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
class HttpsUrl (httpurl.HttpUrl):
|
2005-01-19 01:04:38 +00:00
|
|
|
"""
|
|
|
|
|
Url link with https scheme.
|
|
|
|
|
"""
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
def local_check (self):
|
2005-01-19 01:04:38 +00:00
|
|
|
"""
|
|
|
|
|
Check connection if SSL is supported, else ignore.
|
|
|
|
|
"""
|
2004-08-16 19:20:53 +00:00
|
|
|
if httpurl.supportHttps:
|
|
|
|
|
super(HttpsUrl, self).local_check()
|
2004-07-07 18:15:17 +00:00
|
|
|
else:
|
2005-05-06 14:59:22 +00:00
|
|
|
self.add_info(_("%s URL ignored.") % self.scheme.capitalize())
|