mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-19 13:51:01 +00:00
Automatically set --complete for graph output.
This commit is contained in:
parent
273230d98b
commit
0b5b6ab37b
2 changed files with 10 additions and 9 deletions
|
|
@ -348,6 +348,7 @@ class Configuration (dict):
|
|||
if self['loginurl']:
|
||||
self.sanitize_loginurl()
|
||||
self.sanitize_proxies()
|
||||
self.sanitize_filter()
|
||||
|
||||
def sanitize_anchors (self):
|
||||
"""Make anchor configuration consistent."""
|
||||
|
|
@ -365,6 +366,15 @@ class Configuration (dict):
|
|||
self['output'] = 'text'
|
||||
self['logger'] = self.logger_new(self['output'])
|
||||
|
||||
def sanitize_filter(self):
|
||||
"""Set filter flags for graph loggers."""
|
||||
from ..logger import gml, dot, gxml
|
||||
graph_classes = (gml.GMLLogger, dot.DOTLogger, gxml.GraphXMLLogger)
|
||||
for logger in [self['logger']] + self['fileoutput']:
|
||||
if logger.__class__ in graph_classes:
|
||||
self['complete'] = True
|
||||
break
|
||||
|
||||
def sanitize_scanvirus (self):
|
||||
"""Ensure clamav is installed for virus checking."""
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -640,15 +640,6 @@ config.sanitize()
|
|||
|
||||
log.debug(LOG_CMDLINE, "configuration: %s",
|
||||
pprint.pformat(sorted(config.items())))
|
||||
# warn about sitemap loggers and complete output
|
||||
klasses = [c.__class__ for c in [config['logger']] + config['fileoutput']]
|
||||
if (linkcheck.logger.gml.GMLLogger in klasses or \
|
||||
linkcheck.logger.dot.DOTLogger in klasses or \
|
||||
linkcheck.logger.gxml.GraphXMLLogger in klasses) and \
|
||||
not config['complete']:
|
||||
log.warn(LOG_CMDLINE,
|
||||
_("Using DOT or GML loggers without --complete output"
|
||||
" gives an incomplete sitemap graph."))
|
||||
|
||||
# prepare checking queue
|
||||
aggregate = get_aggregate(config)
|
||||
|
|
|
|||
Loading…
Reference in a new issue