mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 23:24:44 +00:00
fix keyb interr.
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@366 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
e6e38295d7
commit
14e79d2316
4 changed files with 33 additions and 1 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
|
@ -1,3 +1,9 @@
|
|||
linkchecker (1.3.20) unstable; urgency=low
|
||||
|
||||
* fix keyboard interrupt
|
||||
|
||||
-- Bastian Kleineidam <calvin@debian.org> Fri, 8 Feb 2002 20:11:53 +0100
|
||||
|
||||
linkchecker (1.3.19) unstable; urgency=low
|
||||
|
||||
* minor updates for documentation and german translation
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ __init__(self, **args)
|
|||
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
if self.logfield('intro'):
|
||||
self.fd.write("%s\n%s\n" % (Config.AppInfo, Config.Freeware))
|
||||
|
|
@ -140,6 +141,7 @@ __init__(self, **args)
|
|||
|
||||
|
||||
def newUrl(self, urlData):
|
||||
if self.fd is None: return
|
||||
if self.logfield('url'):
|
||||
self.fd.write("\n"+_(LogFields['url'])+Spaces['url']+urlData.urlName)
|
||||
if urlData.cached:
|
||||
|
|
@ -186,6 +188,7 @@ __init__(self, **args)
|
|||
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
if self.logfield('outro'):
|
||||
self.fd.write(_("\nThats it. "))
|
||||
#if self.warnings==1:
|
||||
|
|
@ -232,6 +235,7 @@ class HtmlLogger(StandardLogger):
|
|||
self.tableok = args['tableok']
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
self.fd.write('<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.0//en">\n'+
|
||||
'<html><head><title>'+Config.App+"</title>\n"
|
||||
|
|
@ -254,6 +258,7 @@ class HtmlLogger(StandardLogger):
|
|||
|
||||
|
||||
def newUrl(self, urlData):
|
||||
if self.fd is None: return
|
||||
self.fd.write('<table align=left border="0" cellspacing="0"'
|
||||
' cellpadding="1" bgcolor='+self.colorborder+' summary="Border"'
|
||||
'><tr><td><table align="left" border="0" cellspacing="0"'
|
||||
|
|
@ -316,6 +321,7 @@ class HtmlLogger(StandardLogger):
|
|||
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
if self.logfield("outro"):
|
||||
self.fd.write(_("\nThats it. "))
|
||||
#if self.warnings==1:
|
||||
|
|
@ -376,6 +382,7 @@ class ColoredLogger(StandardLogger):
|
|||
self.prefix = 0
|
||||
|
||||
def newUrl(self, urlData):
|
||||
if self.fd is None: return
|
||||
if self.logfield("parenturl"):
|
||||
if urlData.parentName:
|
||||
if self.currentPage != urlData.parentName:
|
||||
|
|
@ -467,6 +474,7 @@ class ColoredLogger(StandardLogger):
|
|||
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
if self.logfield("outro"):
|
||||
if self.prefix:
|
||||
self.fd.write("o\n")
|
||||
|
|
@ -484,6 +492,7 @@ class GMLLogger(StandardLogger):
|
|||
self.nodeid = 0
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
if self.logfield("intro"):
|
||||
self.fd.write("# "+(_("created by %s at %s\n") % (Config.AppName,
|
||||
|
|
@ -497,6 +506,7 @@ class GMLLogger(StandardLogger):
|
|||
|
||||
def newUrl(self, urlData):
|
||||
"""write one node and all possible edges"""
|
||||
if self.fd is None: return
|
||||
node = urlData
|
||||
if node.url and not self.nodes.has_key(node.url):
|
||||
node.id = self.nodeid
|
||||
|
|
@ -535,6 +545,7 @@ class GMLLogger(StandardLogger):
|
|||
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
self.fd.write("]\n")
|
||||
if self.logfield("outro"):
|
||||
self.stoptime = time.time()
|
||||
|
|
@ -563,6 +574,7 @@ class XMLLogger(StandardLogger):
|
|||
self.nodeid = 0
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
self.fd.write('<?xml version="1.0"?>\n')
|
||||
if self.logfield("intro"):
|
||||
|
|
@ -578,6 +590,7 @@ class XMLLogger(StandardLogger):
|
|||
|
||||
def newUrl(self, urlData):
|
||||
"""write one node and all possible edges"""
|
||||
if self.fd is None: return
|
||||
node = urlData
|
||||
if node.url and not self.nodes.has_key(node.url):
|
||||
node.id = self.nodeid
|
||||
|
|
@ -623,6 +636,7 @@ class XMLLogger(StandardLogger):
|
|||
self.fd.flush()
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
self.fd.write("</graph>\n</GraphXML>\n")
|
||||
if self.logfield("outro"):
|
||||
self.stoptime = time.time()
|
||||
|
|
@ -652,6 +666,7 @@ class SQLLogger(StandardLogger):
|
|||
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
if self.logfield("intro"):
|
||||
self.fd.write("-- "+(_("created by %s at %s\n") % (Config.AppName,
|
||||
|
|
@ -662,6 +677,7 @@ class SQLLogger(StandardLogger):
|
|||
self.fd.flush()
|
||||
|
||||
def newUrl(self, urlData):
|
||||
if self.fd is None: return
|
||||
self.fd.write("insert into %s(urlname,recursionlevel,parentname,"
|
||||
"baseref,errorstring,validstring,warningstring,infoString,"
|
||||
"valid,url,line,name,checktime,downloadtime,cached) values "
|
||||
|
|
@ -686,6 +702,7 @@ class SQLLogger(StandardLogger):
|
|||
self.fd.flush()
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
if self.logfield("outro"):
|
||||
self.stoptime = time.time()
|
||||
duration = self.stoptime - self.starttime
|
||||
|
|
@ -741,6 +758,7 @@ class CSVLogger(StandardLogger):
|
|||
self.separator = args['separator']
|
||||
|
||||
def init(self):
|
||||
if self.fd is None: return
|
||||
self.starttime = time.time()
|
||||
if self.logfield("intro"):
|
||||
self.fd.write("# "+(_("created by %s at %s\n") % (Config.AppName,
|
||||
|
|
@ -767,6 +785,7 @@ class CSVLogger(StandardLogger):
|
|||
self.fd.flush()
|
||||
|
||||
def newUrl(self, urlData):
|
||||
if self.fd is None: return
|
||||
self.fd.write(
|
||||
"%s%s%d%s%s%s%s%s%s%s%s%s%s%s%s%s%d%s%s%s%d%s%s%s%d%s%d%s%d\n" % (
|
||||
urlData.urlName, self.separator,
|
||||
|
|
@ -788,6 +807,7 @@ class CSVLogger(StandardLogger):
|
|||
|
||||
|
||||
def endOfOutput(self, linknumber=-1):
|
||||
if self.fd is None: return
|
||||
self.stoptime = time.time()
|
||||
if self.logfield("outro"):
|
||||
duration = self.stoptime - self.starttime
|
||||
|
|
|
|||
|
|
@ -241,6 +241,12 @@ class UrlData:
|
|||
self._check(config)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except socket.error:
|
||||
# on Unix, ctrl-c can raise
|
||||
# error: (4, 'Interrupted system call')
|
||||
type, value = sys.exc_info()[:2]
|
||||
if type!=4:
|
||||
raise
|
||||
except:
|
||||
internal_error()
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -129,7 +129,7 @@ myname = "Bastian Kleineidam"
|
|||
myemail = "calvin@users.sourceforge.net"
|
||||
|
||||
setup (name = "linkchecker",
|
||||
version = "1.3.19",
|
||||
version = "1.3.20",
|
||||
description = "check HTML documents for broken links",
|
||||
author = myname,
|
||||
author_email = myemail,
|
||||
|
|
|
|||
Loading…
Reference in a new issue