mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-28 10:04:43 +00:00
Fix errors caused by logging LCFormError exceptions
This commit is contained in:
parent
eb2e3271a2
commit
6dc25547d5
1 changed files with 4 additions and 4 deletions
|
|
@ -135,9 +135,9 @@ def checklink (form=None, env=os.environ):
|
|||
form = {}
|
||||
try:
|
||||
checkform(form, env)
|
||||
except LCFormError as errmsg:
|
||||
log(env, errmsg)
|
||||
yield encode(format_error(errmsg))
|
||||
except LCFormError as err:
|
||||
log(env, err)
|
||||
yield encode(format_error(str(err)))
|
||||
return
|
||||
out = ThreadsafeIO()
|
||||
config = get_configuration(form, out)
|
||||
|
|
@ -233,7 +233,7 @@ def checkform (form, env):
|
|||
def log (env, msg):
|
||||
"""Log message to WSGI error output."""
|
||||
logfile = env['wsgi.errors']
|
||||
logfile.write(msg + "\n")
|
||||
logfile.write("%s\n" % msg)
|
||||
|
||||
|
||||
def dump (env, form):
|
||||
|
|
|
|||
Loading…
Reference in a new issue