mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 06:41:00 +00:00
Use new exception log keyword when logging errors
This commit is contained in:
parent
9475f97edb
commit
b8944e493a
1 changed files with 2 additions and 3 deletions
|
|
@ -27,7 +27,6 @@ import time
|
|||
import errno
|
||||
import socket
|
||||
import select
|
||||
import traceback
|
||||
|
||||
from . import absolute_url, StoringHandler, get_url_from
|
||||
from ..cache import geoip
|
||||
|
|
@ -470,8 +469,8 @@ class UrlBase (object):
|
|||
"""
|
||||
An exception occurred. Log it and set the cache flag.
|
||||
"""
|
||||
etype, value, tb = sys.exc_info()
|
||||
log.debug(LOG_CHECK, "exception %s", traceback.format_tb(tb))
|
||||
etype, value = sys.exc_info()[:2]
|
||||
log.debug(LOG_CHECK, "Error in %s: %s %s", self.url, etype, value, exception=True)
|
||||
# note: etype must be the exact class, not a subclass
|
||||
if (etype in ExcNoCacheList) or \
|
||||
(etype == socket.error and value.args[0]==errno.EBADF) or \
|
||||
|
|
|
|||
Loading…
Reference in a new issue