*** empty log message ***

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@368 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2002-02-14 15:33:53 +00:00
parent 14e79d2316
commit 6d7aea08d3
10 changed files with 97 additions and 88 deletions

9
debian/changelog vendored
View file

@ -1,3 +1,12 @@
linkchecker (1.3.21) unstable; urgency=low
* really fix the keyboardinterrupt thing
* enable log=XXX configfile setting, which was always overwritten with
'text'
* update example linkcheckerrc file and documentation
-- Bastian Kleineidam <calvin@debian.org> Thu, 14 Feb 2002 16:34:30 +0100
linkchecker (1.3.20) unstable; urgency=low
* fix keyboard interrupt

View file

@ -399,36 +399,39 @@ class Configuration(UserDict.UserDict):
try:
cfgparser = ConfigParser.ConfigParser()
cfgparser.read(files)
except ConfigParser.Error:
except ConfigParser.Error, msg:
debug(BRING_IT_ON, msg)
return
section="output"
for key in Loggers.keys():
if cfgparser.has_section(key):
for opt in cfgparser.options(key):
try: self[key][opt] = cfgparser.get(key, opt)
except ConfigParser.Error, msg: debug(str(msg)+"\n")
try:
self[key][opt] = cfgparser.get(key, opt)
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
self[key]['fields'] = map(string.strip,
cfgparser.get(key, 'fields').split(','))
except ConfigParser.Error, msg:
debug(BRING_IT_ON, msg)
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
log = cfgparser.get(section, "log")
if Loggers.has_key(log):
self['log'] = self.newLogger(log)
else:
self.warn(_("invalid log option '%s'") % log)
except ConfigParser.Error: pass
except ConfigParser.Error, msg:
debug(BRING_IT_ON, msg)
try:
if cfgparser.getboolean(section, "verbose"):
self["verbose"] = 1
self["warnings"] = 1
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try: self["quiet"] = cfgparser.getboolean(section, "quiet")
except ConfigParser.Error: pass
except ConfigParser.Error, msg:
debug(BRING_IT_ON, msg)
try: self["warnings"] = cfgparser.getboolean(section, "warnings")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
filelist = cfgparser.get(section, "fileoutput").split(",")
for arg in filelist:
@ -437,7 +440,7 @@ class Configuration(UserDict.UserDict):
if Loggers.has_key(arg) and arg != "blacklist":
self['fileoutput'].append(
self.newLogger(arg, {'fileoutput':1}))
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
section="checking"
try:
@ -446,31 +449,31 @@ class Configuration(UserDict.UserDict):
self.disableThreading()
else:
self.enableThreading(num)
except ConfigParser.Error: pass
except ConfigParser.Error: debug(BRING_IT_ON, msg)
try: self["anchors"] = cfgparser.getboolean(section, "anchors")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
num = cfgparser.getint(section, "recursionlevel")
if num<0:
self.error(_("illegal recursionlevel number %d") % num)
self["recursionlevel"] = num
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
self["robotstxt"] = cfgparser.getboolean(section, "robotstxt")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try: self["strict"] = cfgparser.getboolean(section, "strict")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
warn = cfgparser.get(section, "warningregex")
if warn:
self["warningregex"] = re.compile(warn)
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
self["nntpserver"] = cfgparser.get(section, "nntpserver")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try:
self["interactive"] = cfgparser.getboolean(section, "interactive")
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
section = "authentication"
try:
@ -483,7 +486,7 @@ class Configuration(UserDict.UserDict):
'user': auth[1],
'password': auth[2]})
i += 1
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
section = "filtering"
try:
@ -494,9 +497,8 @@ class Configuration(UserDict.UserDict):
self["externlinks"].append((re.compile(tuple[0]),
int(tuple[1])))
i += 1
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try: self["internlinks"].append(re.compile(cfgparser.get(section, "internlinks")))
except ConfigParser.Error: pass
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)
try: self["denyallow"] = cfgparser.getboolean(section, "denyallow")
except ConfigParser.Error: pass
self['log'] = self.newLogger('text')
except ConfigParser.Error, msg: debug(BRING_IT_ON, msg)

View file

@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import sys, re, urlparse, urllib, time, DNS, traceback
import Config, StringUtil, linkcheck, linkname
import sys, re, urlparse, urllib, time, traceback, socket, select
import DNS, Config, StringUtil, linkcheck, linkname
debug = Config.debug
from linkcheck import _
from debuglevels import *
@ -32,6 +32,8 @@ If you disclose some information because its too private to you thats ok.
I will try to help you nontheless (but you have to give me *something*
I can work with ;).
""") % Config.Email
type,value = sys.exc_info()[:2]
print >> sys.stderr, type, value
import traceback
traceback.print_exc()
print_app_info()
@ -58,13 +60,9 @@ ExcList = [
linkcheck.error,
DNS.Error,
linkcheck.timeoutsocket.Timeout,
socket.error,
select.error,
]
try:
import socket
ExcList.append(socket.error)
except ImportError:
pass
# regular expression to match an HTML tag with one given attribute
_linkMatcher = r"""
@ -241,7 +239,7 @@ class UrlData:
self._check(config)
except KeyboardInterrupt:
pass
except socket.error:
except (socket.error, select.error):
# on Unix, ctrl-c can raise
# error: (4, 'Interrupted system call')
type, value = sys.exc_info()[:2]

View file

@ -55,4 +55,4 @@ def checkUrls(config):
except KeyboardInterrupt:
config.finish()
config.log_endOfOutput()
sys.stderr.write(_("linkcheck: warning: keyboard interrupt\n"))
config.warn(_("keyboard interrupt"))

View file

@ -78,7 +78,7 @@ For single-letter option arguments the space is not a necessity. So
Check recursively all links up to given depth (depth >= 0).
Default depth is 1.
-R, --robots-txt
Obey the robots exclusion standard.
Obey the robots exclusion standard (this is the default).
-s, --strict
Check only syntax of extern links, do not try to connect to them.
-t num, --threads=num

View file

@ -93,7 +93,7 @@ Check recursively all links up to given \fIdepth\fP (depth >= 0).
Default depth is 1.
.TP
\fB-R\fP, \fB--robots-txt\fP
Obey the robots exclusion standard.
Obey the robots exclusion standard (this is the default).
.TP
\fB-s\fP, \fB--strict\fP
Check only the syntax of extern links, do not try to connect to them.

View file

@ -1,20 +1,20 @@
# sample resource file with default values
# sample resource file
# see linkchecker -h for help on these options
# commandline options override these settings!
[output]
# turn on/off debug messages
debug=0
# use the text logger
log=text
# use higher numbers for more debugging
#debug=2
# change the logging type
#log=colored
# turn on/off --verbose
verbose=0
#verbose=1
# turn on/off --warnings
warnings=0
#warnings=1
# turn on/off --quiet
quiet=0
#quiet=1
# additional file output
fileoutput=
#fileoutput = text, colored, html, gml, sql
# fields names:
@ -36,80 +36,80 @@ fileoutput=
# each Logger can have separate configuration parameters
# standard text logger
[text]
filename=linkchecker-out.txt
fields=all
#filename=linkchecker-out.txt
#fields=all
# GML logger
[gml]
filename=linkchecker-out.gml
fields=all
#filename=linkchecker-out.gml
#fields=all
# CSV logger
[csv]
filename=linkchecker-out.csv
separator=;
fields=all
#filename=linkchecker-out.csv
#separator=;
#fields=all
# SQL logger
[sql]
filename=linkchecker-out.sql
dbname=linksdb
commandsep=;
fields=all
#filename=linkchecker-out.sql
#dbname=linksdb
#commandsep=;
#fields=all
# HTML logger
[html]
filename=linkchecker-out.html
#filename=linkchecker-out.html
# colors for the various parts
colorbackground="#fff7e5"
colorurl="#dcd5cf"
colorborder="#000000"
colorlink="#191c83"
tablewarning=<td bgcolor="#e0954e">
tableerror=<td bgcolor="#db4930">
tableok=<td bgcolor="#3ba557">
fields=all
#colorbackground="#fff7e5"
#colorurl="#dcd5cf"
#colorborder="#000000"
#colorlink="#191c83"
#tablewarning=<td bgcolor="#e0954e">
#tableerror=<td bgcolor="#db4930">
#tableok=<td bgcolor="#3ba557">
#fields=all
# ANSI color logger
[colored]
filename=linkchecker-out.colored
# colors for the various parts
colorparent=37
colorurl=0
colorname=0
colorreal=36
colorbase=35
colorvalid=1;32
colorinvalid=1;31
colorinfo=0
colorwarning=1;33
colordltime=0
colorreset=0
fields=all
#colorparent=37
#colorurl=0
#colorname=0
#colorreal=36
#colorbase=35
#colorvalid=1;32
#colorinvalid=1;31
#colorinfo=0
#colorwarning=1;33
#colordltime=0
#colorreset=0
#fields=all
# blacklist logger
[blacklist]
filename=~/.blacklist
#filename=~/.blacklist
# checking options
[checking]
# number of threads
threads=5
#threads=5
# check anchors?
anchors=0
recursionlevel=1
#anchors=0
#recursionlevel=1
# obey robots.txt exclusion?
robotstxt=1
#robotstxt=1
# overall strict checking. You can specify for each extern URL
# separately if its strict or not. See the [filtering] section
strict=0
#strict=0
# supply a regular expression for which warnings are printed if found
# in any HTML files.
warningregex=
#warningregex=Oracle DB Error
# Basic NNTP server. Overrides NNTP_SERVER environment variable.
nntpserver=
#nntpserver=
# interactive operation
interactive=0
#interactive=0
# filtering options (see FAQ)
# for each extern link we can specify if it is strict or not
@ -122,7 +122,7 @@ interactive=0
# internlinks=calvinsplayground\.de
# check only syntax of all mail adresses
# extern3=^mailto: 1
denyallow=0
#denyallow=0
# You can provide different user/password pairs for different link types.
# Entries are a triple (link regular expression, username, password),

View file

@ -146,7 +146,7 @@ msgid ""
" Check recursively all links up to given depth (depth >= 0).\n"
" Default depth is 1.\n"
"-R, --robots-txt\n"
" Obey the robots exclusion standard.\n"
" Obey the robots exclusion standard (this is the default).\n"
"-s, --strict\n"
" Check only syntax of extern links, do not try to connect to them.\n"
"-t num, --threads=num\n"

View file

@ -146,7 +146,7 @@ msgid ""
" Check recursively all links up to given depth (depth >= 0).\n"
" Default depth is 1.\n"
"-R, --robots-txt\n"
" Obey the robots exclusion standard.\n"
" Obey the robots exclusion standard (this is the default).\n"
"-s, --strict\n"
" Check only syntax of extern links, do not try to connect to them.\n"
"-t num, --threads=num\n"

View file

@ -129,7 +129,7 @@ myname = "Bastian Kleineidam"
myemail = "calvin@users.sourceforge.net"
setup (name = "linkchecker",
version = "1.3.20",
version = "1.3.21",
description = "check HTML documents for broken links",
author = myname,
author_email = myemail,