mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-04 23:20:34 +00:00
ignore illegal encoding in 'none' logger, and improve error output of -o option
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1953 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
a6779a248c
commit
3df49111ab
1 changed files with 7 additions and 5 deletions
12
linkchecker
12
linkchecker
|
|
@ -421,11 +421,13 @@ if options.output:
|
|||
logtype, encoding = options.output.split("/", 1)
|
||||
else:
|
||||
logtype, encoding = options.output, "iso-8859-15"
|
||||
if linkcheck.Loggers.has_key(logtype) and has_encoding(encoding):
|
||||
config['logger'] = config.logger_new(logtype, encoding=encoding)
|
||||
else:
|
||||
printUsage(_("Illegal argument %r for option %s") % \
|
||||
(options.output, "'-o, --output'"))
|
||||
if not linkcheck.Loggers.has_key(logtype):
|
||||
printUsage(_("Illegal logger type %r in %r for option %s") % \
|
||||
(logtype, options.output, "'-o, --output'"))
|
||||
if logtype != 'none' and not has_encoding(encoding):
|
||||
printUsage(_("Illegal encoding %r in %r for option %s") % \
|
||||
(encoding, options.output, "'-o, --output'"))
|
||||
config['logger'] = config.logger_new(logtype, encoding=encoding)
|
||||
if options.fileoutput:
|
||||
ns = {'fileoutput': 1}
|
||||
for arg in options.fileoutput:
|
||||
|
|
|
|||
Loading…
Reference in a new issue