2004-07-07 18:15:17 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
2006-01-03 19:12:47 +00:00
|
|
|
# Copyright (C) 2001-2006 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 for uncheckable application-specific links.
|
|
|
|
|
"""
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
import urlbase
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
class IgnoredUrl (urlbase.UrlBase):
|
2005-01-19 01:04:38 +00:00
|
|
|
"""
|
|
|
|
|
Some schemes are defined in <http://www.w3.org/Addressing/schemes>.
|
|
|
|
|
"""
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
def local_check (self):
|
2005-02-08 12:10:39 +00:00
|
|
|
"""
|
2005-05-06 14:59:22 +00:00
|
|
|
Only logs that this URL is ignored.
|
2005-02-08 12:10:39 +00:00
|
|
|
"""
|
2005-07-04 22:19:52 +00:00
|
|
|
self.set_extern(self.url)
|
|
|
|
|
if self.extern[0] and self.extern[1]:
|
2005-06-20 14:53:23 +00:00
|
|
|
self.add_info(_("Outside of domain filter, checked only syntax."))
|
|
|
|
|
else:
|
2005-07-13 15:03:17 +00:00
|
|
|
self.add_warning(_("%s URL ignored.") % self.scheme.capitalize(),
|
|
|
|
|
tag="ignore-url")
|
2004-07-07 18:15:17 +00:00
|
|
|
|
2004-08-16 19:20:53 +00:00
|
|
|
def can_get_content (self):
|
2005-02-08 12:10:39 +00:00
|
|
|
"""
|
|
|
|
|
Ignored URLs have no content.
|
|
|
|
|
|
|
|
|
|
@return: False
|
|
|
|
|
@rtype: bool
|
|
|
|
|
"""
|
2004-07-07 18:15:17 +00:00
|
|
|
return False
|