mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-21 21:01:52 +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)
|
logtype, encoding = options.output.split("/", 1)
|
||||||
else:
|
else:
|
||||||
logtype, encoding = options.output, "iso-8859-15"
|
logtype, encoding = options.output, "iso-8859-15"
|
||||||
if linkcheck.Loggers.has_key(logtype) and has_encoding(encoding):
|
if not linkcheck.Loggers.has_key(logtype):
|
||||||
config['logger'] = config.logger_new(logtype, encoding=encoding)
|
printUsage(_("Illegal logger type %r in %r for option %s") % \
|
||||||
else:
|
(logtype, options.output, "'-o, --output'"))
|
||||||
printUsage(_("Illegal argument %r for option %s") % \
|
if logtype != 'none' and not has_encoding(encoding):
|
||||||
(options.output, "'-o, --output'"))
|
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:
|
if options.fileoutput:
|
||||||
ns = {'fileoutput': 1}
|
ns = {'fileoutput': 1}
|
||||||
for arg in options.fileoutput:
|
for arg in options.fileoutput:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue